Skip to content

SetterBox ​

One button, pressed when the variable holds its entry; a SetterBar is a row of them.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageSetterBox✓
SetterBox(binding, domain, shown, options)One button, pressed when the variable holds its entry; a SetterBar is a row of them.
Typed signatures
TypePackageApplies
(expression, expression, boxes, expression*) -> boxesboxesalways

Domain: Boxes

Details
  • Wolfram's SetterBar is a GridBox row of these, one per entry. The domain is the one value, as [a], and the third argument is the box the button shows, as SetterBox[Dynamic[c], {a}, label] in Wolfram. A Setter over a whole list is one value there, {{a, b, c}}; here the list is the entries of a bar.
  • A TogglerBar is the same row over Dynamic(MemberQ(x, a)): pressing a button puts its entry in the list x or takes it out.
  • A reader of the controls (the keyboard driver, reduce, the terminal drawer) groups a row that shares a binding back into the one SetterBar or TogglerBar, so each variable has one control.
  • Its intent is a choice.

Examples

Basic #

a box is inert: it evaluates to itself

live ↗
InSetterBox(Dynamic(c),[a],a)\mathrm{SetterBox}(\mathrm{Dynamic}(c), \bigl\lbrack a\bigr\rbrack, \text{a})OutSetterBox(Dynamic(c),[a],a)\mathrm{SetterBox}(\mathrm{Dynamic}(c), \bigl\lbrack a\bigr\rbrack, \text{a})
About
Examples1
Checked againstWolfram Language 1 agree
CrosswalkWolfram Language

See also: RadioButtonBox, PopupMenuBox, TogglerBox