Hiding Menuitems

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Hiding Menuitems

Post by andyh1234 » Wed Nov 02, 2011 6:29 pm

Hi,

Can any one point me in the right direction on how to hide a menu item?

Ive created a menu with the menubuilder, and can enable and disable items in that menu, but I have an instance where I want to remove some items rather than have them just disabled / greyed out. Is this possible.

As an example. in the Help menu I have a menu item 'Buy a License'. Id like this to disappear in the registered version completely, and not just be greyed out.

Probably something simple Im just missing!

Thanks

Andy

Klaus
Posts: 14213
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Hiding Menuitems

Post by Klaus » Wed Nov 02, 2011 6:39 pm

Hi Andy,

unfortunately you cannot do this directly but need to manipulate: the text of btn "your menu here"
Yes, menus are simple buttons :D

Try this:
...
put the text of btn "your menu here" into tMenu
filter tMenu without ("Buy a License" & "*")
## * in case you also have some shortcuts defined here like /B or something AFTER the name of the menuitem
set the text of btn "your menu here" to tMenu
...


Best

Klaus

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: Hiding Menuitems

Post by andyh1234 » Wed Nov 02, 2011 10:52 pm

Thanks Klaus!

Andy

Post Reply