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 ValueStyleBehavior
0Push ButtonMomentary — triggers action on click, no persistent state
1Toggle (no indicator)Two-state — appearance changes between pressed/released
2Toggle (with indicator)Two-state — square indicator shows selected state
3CheckboxTwo-state — checkmark indicator

DFD Properties

Appearance

PropertyDescription
Button TypePush (0), Toggle no indicator (1), Toggle with indicator (2), Checkbox (3)
Label TypeText (0), Pixmap/image (1), Transparent (2)
LabelButton text (unselected/out state)
Selected LabelButton text (selected/in state, toggles only)
Shadow Thickness3D border depth in pixels
Select ColorFill color when toggle is in selected state

Actions — Selected (In) State

PropertyDescription
ActionSAMMI command to execute
Logical ServerTarget peer or $local-cmd
Format NamePage name for navigation commands
DDO NameTarget DDO for data insertion
ExecuteCommand string to send

Actions — Unselected (Out) State

Toggle buttons can have a different action for the out state:

PropertyDescription
Off ActionCommand when deselected
Off Logical ServerTarget for deselect action
Off Format NamePage for deselect navigation
Off DDO NameTarget DDO for deselect
Off ExecuteCommand string for deselect

Options

PropertyDescription
ConfirmShow confirmation dialog before executing
Confirm MessageCustom confirmation prompt text
Button Group IDParent button group (-1 = standalone)
GadgetMotif gadget flag (legacy)

Common Use Cases

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:

  1. Place a Button Group DDO on the page
  2. Set each toggle button’s Button Group ID to the group’s DFD ID
  3. 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

See Also