Greetings everyone.
I'm having some trouble with Option Menu bottons...
I know how to get the current index of the selected options of an option menu (using the menuHistory)
However,
- How do I get the value of the current selected item OR the value corresponding to index N?
- How can can I get the index of option "ABC"
Thanks in advance for any help.
- Miguel Pinto
Option Menu Button value
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Option Menu Button value
Hola Miguel,
what do you mean by "index" of an option button?
You can query the current LABEL of that button if that is what you mean?
Best
Klaus
what do you mean by "index" of an option button?
You can query the current LABEL of that button if that is what you mean?
Best
Klaus
Re: Option Menu Button value
The menuHistory of a button returns the index of the selected option, correct?
So, I would like to be able to get the value of the button given the index or vice versa
So, I would like to be able to get the value of the button given the index or vice versa
Re: Option Menu Button value
Hola Miguel,
With a number (menuhistory) in a variable named "tMenuH":
...
put the text of btn "your option button here" into tOptions
answer line tMenuH of tOptions
...
With a menuitem:
...
## We use LINEOFFSET
put the text of btn "your option button here" into tOptions
set the wholematches to TRUE
answer lineoffset("name of menu item",tOptions)
...
Best
Klaus
ah, yes, sure!palanolho wrote:The menuHistory of a button returns the index of the selected option, correct?
OK, just check "the text of btn xyz" = its menuitems!palanolho wrote:So, I would like to be able to get the value of the button given the index or vice versa
With a number (menuhistory) in a variable named "tMenuH":
...
put the text of btn "your option button here" into tOptions
answer line tMenuH of tOptions
...
With a menuitem:
...
## We use LINEOFFSET
put the text of btn "your option button here" into tOptions
set the wholematches to TRUE
answer lineoffset("name of menu item",tOptions)
...
Best
Klaus