[Gambas-devel] gb3 menus and the item that was clicked
Kadaitcha Man
nospam.nospam.nospam at ...176...
Thu Dec 31 03:01:28 CET 2009
2009/12/31 Toni <arosa at ...615...>:
> Hi,
> Did you try using "LAST" ?
>
> E.g. Last.Name would give you the name of the last clicked menu.
>
> For instance, if you generate the menus dinamically I guess that you
> could use the same event firing for all of them (I haven't tested it,
> but it could go as follows):
>
> DIM mnu AS Menu
> mnu = NEW Menu(rootmenu) AS "MnuHandler"
> mnu.Name = "mnu1"
> mnu.Caption = "a"
> mnu = NEW Menu(rootmenu) AS "MnuHandler"
> mnu.Name = "mnu2"
> mnu.Caption = "b"
>
> and then
>
> PUBLIC SUB MnuHandler_Click()
> DEBUG Last.Name
> END
>
> Regards,
Benoit has corrected my apparent misunderstandings. You were right, I
was wrong. My apologies, and my thanks.
More information about the Devel
mailing list