typestar

Numbers and text a user can edit in Igor Pro

SetVariable binds a control to a global, so the value outlives the click.

Function AddFields()
    NVAR threshold = root:Settings:gThreshold
    SVAR label = root:Settings:gLastFile

    SetVariable thrSet, pos={16, 80}, size={200, 18}, bodyWidth=70
    SetVariable thrSet, title="Threshold", value=threshold
    SetVariable thrSet, limits={0, 10, 0.1}, proc=ThresholdChanged

    SetVariable nameSet, pos={16, 104}, size={280, 18}
    SetVariable nameSet, title="File", value=label
End

How it works

  1. value= names the global the control reads and writes.
  2. limits={low, high, step} bounds it and sets the arrow increment.
  3. bodyWidth= keeps the box a sensible width next to a long title.

Keywords and builtins used here

The run, in numbers

Lines
11
Characters to type
384
Tokens
97
Three-star pace
85 tpm

At the three-star pace of 85 tokens a minute, this run takes about 68 seconds.

Type this snippet

Step 1 of 5 in Values a user sets, step 4 of 18 in Panels & GUI.

← Previous Next →