Grouping controls in Igor Pro
A GroupBox is a frame with a title, and it is how a busy panel stays readable.
Function GroupedPanel()
DoWindow/K Grouped
NewPanel/N=Grouped/K=1/W=(100, 100, 400, 300)
ModifyPanel fixedSize=1
GroupBox inputGroup, pos={12, 8}, size={276, 78}, title="Input"
SetVariable fileSet, pos={24, 32}, size={250, 18}, title="File"
SetVariable rateSet, pos={24, 56}, size={250, 18}, title="Rate"
GroupBox outputGroup, pos={12, 94}, size={276, 60}, title="Output"
CheckBox saveChk, pos={24, 116}, title="Save result", value=1
TitleBox note, pos={12, 162}, size={276, 16}, frame=0
TitleBox note, title="Nothing runs until you press Apply."
End
How it works
GroupBoxdraws the frame; the controls inside are positioned normally.frame=0on a TitleBox gives you a label without a box.fixedSize=1on the panel stops a drag ruining the arrangement.
Keywords and builtins used here
CheckBoxDoWindowEndFunctionGroupBoxModifyPanelNewPanelSetVariableTitleBoxnote
The run, in numbers
- Lines
- 15
- Characters to type
- 553
- Tokens
- 164
- Three-star pace
- 80 tpm
At the three-star pace of 80 tokens a minute, this run takes about 123 seconds.
Step 3 of 3 in A panel, step 3 of 18 in Panels & GUI.