[Gambas-user] Dinamic menus and clicks
M. Cs.
mohareve at ...626...
Fri Aug 6 22:59:48 CEST 2010
The next question is, how can I retrieve the text of a menu item, which was
created dinamicaly with
PUBLIC FUNCTION FillMenu(MenuParent AS Menu, root AS String)
DIM s AS String
DIM hMenu AS Menu
IF MenuParent.Children.Count > 0 THEN MenuParent.Children[0].Delete
FOR EACH s IN Dir(root, "*", gb.directory)
hMenu = NEW Menu(MenuParent)
hMenu.Text = s
hMenu.Picture = Picture["icon:/small/directory"]
IF IsDir(MenuParent.Tag &/ s) THEN
hMenu = NEW Menu(MenuParent)
hMenu.Text = ".Child."
ENDIF
NEXT
END
More information about the User
mailing list