Push Button
note
This page has been automatically translated and has not been reviewed in detail yet. Therefore, the translation might not be completely accurate.
The Push button control simulates a simple print head. The events onTrue, onFalse and always onChange are delivered in the interaction.
CSS Classes
- dashboardRadioControl: the outer HTML element (DIV) for representing the building block in the template or control receives this CSS class.
- controlEnabled: this CSS class is additionally set if the Status parameter returns the value true - this is referred to below as enabled.
- controlDisabled: analogous if the Status parameter returns false - briefly referred to as disabled. Note that the value of Status cannot return either false or true (e.g. because Status has not been assigned to a parameter). In this case the block is neither enabled nor disabled.
- controlActiveTrue: as with the Status parameter, only here the Active parameter is compared to true - the corresponding name is of course active.
- controlActiveFalse: inactive for a value of false of the Active parameter.
- dashboardRadioControlInput: in this HTML element (DIV) the toggle button (CSS border-radius:50%) is visualized.
- on: if the value of the Source parameter is truthy (JavaScript !!).
- off: if the value of the Source parameter is falsy (JavaScript !).
If the block is disabled, it does not respond to interactions.
CSS variables
- --dashboard-radio-control-background, default #ffffff: the background (CSS background) of the entire block.
- --dashboard-radio-control-foreground, default #000000: the background (CSS background) of the toggle button when the Source parameter has a truthy (JavaScript *!! *) Delivers value.
Special instructions
The toggle button appears (in the configured color) as soon as the value of the Source parameter is truthy in the JavaScript sense - e.g. true, 12, [], , ... However, when changes are made, true or false is always written back to the parameter - if it was connected. This can lead to error messages if the parameter or the associated variable is not a simple truth value.