[Gambas-user] Dinamic menus and clicks

Fabien Bodard gambas.fr at ...626...
Sat Aug 7 12:24:50 CEST 2010


this is the full tuto :)



2010/8/6 M. Cs. <mohareve at ...626...>:
> 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
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menudyn-0.0.1.tar.gz
Type: application/x-gzip
Size: 8880 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20100807/1467caab/attachment.bin>


More information about the User mailing list