Removing Arrow From Set Variable in Panel
geologic
This is an excerpt of code from the thread here: http://www.igorexchange.com/node/7112
Function OpenCalculatePanel()
DoWindow/K CalculatePanel
Newpanel /W=(248,115,730,626)/N=CalculatePanel
SetVariable sspctrl title="sample start position ",size={400,136},pos={40,400},proc=SetVarProc, value=_num:0, limits={-1000000,100000,0}
return 0
end
DoWindow/K CalculatePanel
Newpanel /W=(248,115,730,626)/N=CalculatePanel
SetVariable sspctrl title="sample start position ",size={400,136},pos={40,400},proc=SetVarProc, value=_num:0, limits={-1000000,100000,0}
return 0
end
From Command Help for setVariable
limits={low,high,inc } low and high set the limits of the allowable values for the variable. inc sets the amount by which the variable is incremented if you click the control's up/down arrows. This applies to numeric variables, not to string variables. If inc is zero then the up/down arrows will not be drawn.
May 23, 2016 at 10:14 am - Permalink
You can use +-inf as the limits:
limits={-inf, inf, 0}
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
May 23, 2016 at 01:41 pm - Permalink
May 23, 2016 at 03:23 pm - Permalink
We think the limits are a feature, not a an annoyance. But it's one of those things that reasonable people can disagree on. So in this case, that's Just How It Works.
Which is precisely why we support that usage.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
May 24, 2016 at 03:53 pm - Permalink
I suppose you're right...I just didn't have a reason to expect to need the arrows, so when I went to eliminate them and saw that I had to impose limits, I had to solve a problem I didn't expect to. +-inf is fine though, it's essentially not having limits at all. Just wasn't aware of the utility of inf :P
Thanks again for your help.
May 25, 2016 at 06:24 am - Permalink