Q: Titlebox read & PopUpMenu set?
| Daniel G | February 28, 2012 - 04:28 | ||
|---|---|---|---|
|
Q: How to set a PopUpMenu's item? Hello Igor Community, I have another small problem which I wasn't able to solve with the Igor help or the forum. [ last edited February 28, 2012 - 04:29 ]
|
|||
| gregorK | February 28, 2012 - 05:24 | ||
|---|---|---|---|
|
ControlInfo sets also a global string variable S_recreation which is the command that recreates the named control. The title of the TitleBox control can be found in that string and then extracted. You could use code like String sout ControlInfo title0 sout= StringFromList(1,ListMatch(S_recreation, "title=*", ","),"\"") print sout but probably it can be done easier and I am not perfectly sure if the line above is really bug-free ... Of course you should first create a TitleBox named title0 for the above code to work. Hope this helps! Gregor |
|||
| February 28, 2012 - 09:03 | |||
|---|---|---|---|
|
Q: How to set a PopUpMenu's item?
Hello Igor Community, I have another small problem which I wasn't able to solve with the Igor help or the forum. Use: PopupMenu pop0, mode=1 // select first item in the popup list PopupMenu pop0, mode=2 // select second item in the popup list PopupMenu pop0, mode=3 // select third item in the popup list PopupMenu pop0, mode=4 // select fourth item in the popup list If you want to change the selection by string , use: Popupmenu pop0, popmatch="this text must match the third item" --Jim Prouty |
|||


Joined: 2011-09-06
Location: Germany
Q: How to read a TitleBox's title
It's just a simple problem,
I couldn't figure out how to read the title for a comparison (stringmatch(anotherString, TitleBox'sTitle)).
The title is not being set by a string variable, which is why ControlInfo + S_Value won't work (I suppose)...
Thanks for helping me out!