Configuring Push Buttons
Push Buttons are interactive DDOs that let users trigger commands, toggle states, or navigate between pages at runtime. SAMMI supports several button styles.
Button Types
| Type Value | Style | Behavior |
|---|---|---|
| 0 | Push Button | Momentary — triggers action on click, no persistent state |
| 1 | Toggle (no indicator) | Two-state — appearance changes between pressed/released |
| 2 | Toggle (with indicator) | Two-state — square indicator shows selected state |
| 3 | Checkbox | Two-state — checkmark indicator |
DFD Properties
Appearance
| Property | Description |
|---|---|
| Button Type | Push (0), Toggle no indicator (1), Toggle with indicator (2), Checkbox (3) |
| Label Type | Text (0), Pixmap/image (1), Transparent (2) |
| Label | Button text (unselected/out state) |
| Selected Label | Button text (selected/in state, toggles only) |
| Shadow Thickness | 3D border depth in pixels |
| Select Color | Fill color when toggle is in selected state |
Actions — Selected (In) State
| Property | Description |
|---|---|
| Action | SAMMI command to execute |
| Logical Server | Target peer or $local-cmd |
| Format Name | Page name for navigation commands |
| DDO Name | Target DDO for data insertion |
| Execute | Command string to send |
Actions — Unselected (Out) State
Toggle buttons can have a different action for the out state:
| Property | Description |
|---|---|
| Off Action | Command when deselected |
| Off Logical Server | Target for deselect action |
| Off Format Name | Page for deselect navigation |
| Off DDO Name | Target DDO for deselect |
| Off Execute | Command string for deselect |
Options
| Property | Description |
|---|---|
| Confirm | Show confirmation dialog before executing |
| Confirm Message | Custom confirmation prompt text |
| Button Group ID | Parent button group (-1 = standalone) |
| Gadget | Motif gadget flag (legacy) |
Common Use Cases
Navigation Button
Open a page when clicked:
Button Type: 0 (Push)
Action: aw (Add Window)
Format Name: pump_detail_40
Toggle with State Feedback
Control an on/off state:
Button Type: 2 (Toggle with indicator)
Label: "Pump OFF"
Selected Label: "Pump ON"
Select Color: #00ff00
Logical Server: peer_slow
Read Key: pump_state
Write Key: pump_state
Confirmation Button
Delete action with safety dialog:
Button Type: 0 (Push)
Action: dw (Delete Window)
Confirm: true
Confirm Message: "Close this display?"
Button Groups
Button Groups create mutually exclusive (radio) or non-exclusive (checkbox) sets:
- Place a Button Group DDO on the page
- Set each toggle button’s Button Group ID to the group’s DFD ID
- In radio mode, selecting one button deselects the others
Visual Rendering
- Push buttons show a Motif-style 3D raised border
- Pressed state inverts the shadow (sunken appearance)
- Toggle with indicator shows a square indicator box on the left side
- Checkbox shows a checkmark in the indicator box
- Shadow thickness controls the 3D border depth
- Transparent buttons (labelType=2) are invisible — useful as clickable overlays on background images
Tips
- Use Confirm for destructive actions (delete, shutdown, etc.)
- $local-cmd as the logical server runs SAMMI internal commands
- Toggle buttons with indicators are the clearest for on/off states
- Set Select Color to a bright color for clear visual feedback
- Transparent buttons are useful for creating clickable hotspots over background images