Trying to figure out a way to use one button's state to hide another button. Any ideas?
What are the buttons?
It appears @hideif, @hideifpath and @hideifpathr have all disappeared from the online manual...
The online manual doesn't get updated for beta versions, but they're in the manual supplied with the program.
Makes sense. Thanks Jon!
Assuming the Filters button runs this:
Toolbar NAME="Filters" TOGGLE
You could hide another button like this:
@hideif:Toolbar NAME="Filters" TOGGLE
Or reversed, like this:
@hideif:!Toolbar NAME="Filters" TOGGLE
Leo,
thanks for the pointer. I was able to mostly achieve the desired effect by triggering the action through toggling an empty toolbar at the bottom. Not ideal as the toolbar must have a minimum height, but it works.
Is there a way to detect a button's state, then trigger from there? Something like this:
@hideif:button-name.state=0
It depends what command the button runs.
And that, for me, is the catch-22 in this instance. The only command I want a particular button to run is to hide/show other specific buttons, just like a toolbar toggle, based on simply clicking the button (ie changing it's state).
In the next version @hideif will work with custom variables so you should be able to set something like this up.
Coming back to this with 12.2.3 beta, I'm attempting to establish a global variable as follows:
[code]@toggle:if $glob!:MyToolbarVar
@ifset:$glob!:MyToolbarVar
@set glob!:MyToolbarVar
@ifset:else
@set glob!:MyToolbarVar=1[/code]
I want to use the variable to determine whether a button gets hidden or not as follows:
@hideif: $glob:MyToolbarVar=1
Unfortunately, it doesn't do anything. Am I coding both properly? What am I missing?
Still hoping for some insight on this...
It needs to be:
@hideif:$glob:MyToolbarVar
(Removed space before the $ and "=1" from the end.)
It works! Thanks Leo!
A post was split to a new topic: How to hide the Menu toolbar?