[Gambas-user] Menu disable?
Leonardo Miliani
leonardo at ...1237...
Wed Sep 10 23:19:24 CEST 2008
Ron ha scritto:
> Hi,
>
> Having build login functionality in my application brings up the next
> challenge ;-)
>
> Can you disable a menu, so you see it (greyed out) but can't select
> anything?
>
> I have tried to uncheck Enabled in menu editor, but I see no change.
> Also setting property like MenuDevices.Enabled = FALSE doesn't change a
> thing, I can still use it.
>
> Hide and Show are working, but enable/disable aren't, any clue(s)?
>
> Thanks.
>
> Gambas 2.8.1, gb.qt
>
> Regards,
> Ron_2nd.
>
Do it by code....
Let's imagine that you have this menus:
Menu1
-First
-Second
Menu2
-Third
-Fourth
If you want to deselect a voice, just use i.e. First.Enabled = False, if
you want to hide it just use First.Visible = False.
If you want to hide an entire menu just type in i.e. Menu1.Visible = False.
--
Ciao.
Leo.
Web: www.leonardomiliani.com
E-mail: leonardo at ...1237...
Scegli software opensource - Choose opensource software
Co-fondatore di Gambas-it.org
Il sito di riferimento della comunità italiana degli utenti di Gambas
www.gambas-it.org
More information about the User
mailing list