Skip to content

TogglerBox ​

A button that cycles through its entries: Toggler lowers to it.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageTogglerBox✓
TogglerBox(binding, domain, shown, options)A button that cycles through its entries: Toggler lowers to it.
Typed signatures
TypePackageApplies
(expression, expression, boxes, expression*) -> boxesboxesalways

Domain: Boxes

Details
  • The domain is a rule list of value -> label, and the third argument is DynamicBox(ToBoxes(x, StandardForm)), the variable's value as it is shown, both as Wolfram boxes a Toggler; a press moves to the next. Where Wolfram's absent range is {True -> True, False -> False}, ours is Automatic.
  • Its intent is a toggle.

Examples

Basic #

a box is inert: it evaluates to itself

live ↗
InTogglerBox(Dynamic(s),[KeyValuePair⁡(off,off),KeyValuePair⁡(on,on)],DynamicBox(ToBoxes(s,StandardForm)))\mathrm{TogglerBox}(\mathrm{Dynamic}(s), \bigl\lbrack\operatorname{KeyValuePair}(\mathrm{off}, \text{off}), \operatorname{KeyValuePair}(\mathrm{on}, \text{on})\bigr\rbrack, \mathrm{DynamicBox}(\mathrm{ToBoxes}(s, \mathrm{StandardForm})))OutTogglerBox(Dynamic(s),[(off,off),(on,on)],DynamicBox(ToBoxes(s,StandardForm)))\mathrm{TogglerBox}(\mathrm{Dynamic}(s), \bigl\lbrack(\mathrm{off},\text{off}), (\mathrm{on},\text{on})\bigr\rbrack, \mathrm{DynamicBox}(\mathrm{ToBoxes}(s, \mathrm{StandardForm})))
About
Examples1
Checked againstWolfram Language 1 agree
CrosswalkWolfram Language

See also: CheckboxBox, SetterBox