[Gambas-user] Menus

Bodard Fabien gambasfr at ...11...
Tue Aug 3 21:55:57 CEST 2004


Le lundi 2 Août 2004 22:40, Gianni Piccini a écrit :
> Anybody knows if there is a method to check if enable or disable menus when
> clicking top level menu? I mean that, if I've a menu like this
>
> File
>   Open
>   Close
>   Exit
>
> for example I would like to have Close enabled only if something is open...
> there are some others situations where I can disable menus, but certainly
> the top level menu is the last and most secure (and surely the most
> professional). Obviously, inserting a condition in MenuFile_Click() doesn't
> work.

	There is a soluce, if i understand what you mean...

Public sub MenuFile_Show()

	IF SomethingOpened THEN MenuClose.Enabled = TRUE

END

The show event is call before the menu is chown

Fabien

>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list