[Gambas-user] control groups
Benoit Minisini
gambas at ...1...
Sat Feb 21 22:30:08 CET 2004
On Saturday 21 February 2004 22:17, Joao Pinto wrote:
> Hello,
> are control groups working ?
> I have tried the following example from the help but the click event
> code is not being executed.
>
> ...
> ' Gambas class file
> STATIC PUBLIC SUB Main()
> DIM FMain AS Form
> DIM hButton[3] AS Button
> FMain = NEW Form1
>
>
> hButton[0] = NEW Button(Fmain) AS "MyButtons"
> hButton[0].Text = "Red"
>
> hButton[1] = NEW Button(Fmain) AS "MyButtons"
> hButton[1].Text = "Green"
> hButton[1].Y = 50
>
> hButton[2] = NEW Button(Fmain) AS "MyButtons"
> hButton[2].Text = "Blue"
> hButton[2].Y = 100
> FMain.show
> END
> PUBLIC SUB MyButtons_Click()
>
> lblTxt.text = LAST.Text
> END
> ...
If I remember :-), MyButtons_Click must be static, because you created your
controls in a static function.
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list