Page 1 of 1

Hiding menu options

Posted: Tue Mar 18, 2014 5:22 pm
by tasdvl9
Hello,

I have a menu option control populated with 9 items. I'm trying to only have 7 options
visible when the user selects a certain setting in my application. When the user refreshes the
app I'd then like the 9 options listed again. Is there a way to hide and then make visible the options
in the option menu control?

Thanks!

Re: Hiding menu options

Posted: Tue Mar 18, 2014 5:44 pm
by Klaus
Hi tasdvl9,

since "menus" are just text (a CR delimited list), you can store one list with 7 and one with 9 lines (options)
in a custom property of the button or in (global) variables, and set the appropriate menus "on the fly"
...
global tVarWith9lines,tVarWith7lines
...
set the text of btn "your option menu button here" to tVarWith9lines
...
set the text of btn "your option menu button here" to tVarWith7lines
...
You get the picture :D


Best

Klaus

Re: Hiding menu options

Posted: Tue Mar 18, 2014 6:36 pm
by tasdvl9
Thanks, Klaus!

Excellent suggestion :)