[Gambas-user] Menu disable?

Ron ron at ...1740...
Thu Sep 11 16:56:18 CEST 2008


Leonardo Miliani schreef:
> 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.
>
>   
Hi, thanks for your reply.

The point is that  I tried it a few times like you describe and it 
didn't work, I just tried it again and it worked straight away...
I'm stumped.. ;(

Regards,
Ron_2nd




More information about the User mailing list