Push button
TwPushButton · Category: Buttons
Confirmation
Needs Confirmation only applies in Maintained (latching) mode: on every press a confirmation dialog opens before the value is written. In Momentary and Pulse mode no confirmation is asked; a dialog cannot be waited for while the button is held or during a fixed-length pulse. If the option is on in these modes, the settings show a note: switch the mode to Maintained if a confirmation is needed, otherwise turn the option off.
The ready-made manual control blocks (motor start/stop, jog, pump, valve) save this option turned on; it has no effect on their momentary and pulse buttons. Use enough size and spacing on these buttons against mistaps (see Touch Panels).
Two-step apply
Two-Step Apply only works in Pulse and Maintained (latching) mode: the first press arms the button and the caption plate shows "Press again"; the value is written only by a second press within Second Press Window (s). In Momentary mode the option is not used; if it is on, the settings show a note. Details: Two-step apply.
Locked look
From 2.11.0 the Push button is also dimmed and shows the lock when Read Only is bound to a tag whose value is true or the user lacks the permission. If a Lock Reason is set, tapping the locked button shows it. See Locked controls.
Settings
These settings are in the properties panel on the right while the widget is selected, mostly in the Push Button Settings section. The default value is the value the widget has when it is first added to a page.
Behavior
| Setting | Type | Default | Description |
|---|---|---|---|
Modemode | Selection | momentary | Momentary writes Pressed Value while the button is held and Released Value when it is let go. Maintained toggles between the two values on every press. Pulse writes Pressed Value and Released Value automatically after Pulse Length. Options: momentary Momentary, maintained Maintained (latching), pulse Pulse |
Read OnlyreadOnly | Checkbox | Off | When on, the button cannot be operated at runtime. |
Two-Step ApplytwoStepApply | Checkbox | Off | Pulse and maintained modes only: the first press arms the button (pulsing outline and "Press again" on the caption plate); the value is written only by a second press within the window. The armed state ends without writing when the window runs out, on a press elsewhere, when the window loses focus, or when the page is hidden or changes. With Needs Confirmation also on (maintained mode), the confirmation dialog still opens after the second press. Not used in momentary mode. |
Lock ReasonlockReason | Text | — | Optional. While the control is locked at runtime (Read Only bound to a tag that is true, or a user without write permission), a tap shows this text briefly instead of the permission message, and it appears as the tooltip. Example: "Interlock: door open". A locale key is translated. Empty keeps the default behaviour. |
Pulse Length (ms)pulseMs | Number | 500 | Pulse mode only: time in milliseconds before Released Value is written (50 to 10000). |
Needs ConfirmationneedsConfirmation | Checkbox | Off | Maintained mode only: asks for confirmation before the value is written. Momentary and pulse presses are never confirmed. |
Second Press Window (s)twoStepSeconds | Number (1–10) | 3 | Time in seconds for the second press while Two-Step Apply is on (1 to 10, default 3). |
Values
| Setting | Type | Default | Description |
|---|---|---|---|
Pressed ValuepressedValue | Value (typed) | true | Value written on press. Bind the command Tag to this property; Released Value is written to the same Tag. |
Feedback ValueprocessValue | Value (typed) | — | Optional feedback Tag that drives the lamp ring. Without it the lamp follows the command Tag. |
Released ValuereleasedValue | Value (typed) | false | Value written to the command Tag on release (momentary, pulse) or when a maintained button is released. |
Lamp On ValuelampOnValue | Value (typed) | true | Feedback value that lights the lamp ring. |
Appearance
| Setting | Type | Default | Description |
|---|---|---|---|
Colorcolor | Selection | green | Cap color. Green, red, yellow and blue follow the theme status colors. Options: green Green, red Red, yellow Yellow, blue Blue, white White, black Black |
Illuminatedilluminated | Checkbox | On | Shows the lamp ring. The lamp shows the Tag value, not the local press. |
Shapeshape | Selection | flush | Cap shape: flush, extended or mushroom head. A mushroom button on screen is not an emergency stop or any other safety device. Options: flush Flush, extended Extended, mushroom Mushroom |
Captionlabel | Text | START | Text of the caption plate under the button. Leave empty to hide the plate. |
Other settings
| Setting | Type | Default | Description |
|---|---|---|---|
Enable FlashingenableFlashing | Checkbox | Off | Makes the widget blink (an opacity pulse every second). Usually bound to an alarm condition. |
Log ButtonlogButton | Checkbox | Off | At runtime shows a chart icon when hovering the widget; clicking it adds the Tags bound to the widget to the log Tag list. |
Bindings
In the Bindings (Rules) section of the properties panel, a Tag can be bound to the following properties of this widget with a Direct binding. The binding types (Direct, IntRange, FloatRange, Boolean, Bit) are the same for all widgets; they are described on the Widget Reference page.
title, visible, authorization, x, y, width, height, rotation, class, foregroundColor, backgroundColor, borderColor, borderStyle, borderWidth, borderRadius, borderTopLeftRadius, borderTopRightRadius, enableFlashing, logButton, lockReason, readOnly, needsConfirmation, twoStepApply, twoStepSeconds, mode, pulseMs, pressedValue, releasedValue, processValue, lampOnValue, illuminated, color, shape, label
The style fields of the widget can also be bound as style.<field> (e.g. style.left, style.top).
Common sections
While this widget is selected, the properties panel also shows these common sections: General, Layout, Appearance, Bindings (Rules). These sections are described on the Page Editor page.