Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Buttons of Type Toggle

  • Last UpdatedJan 09, 2024
  • 1 minute read

Buttons can optionally be used in toggle mode, where they show visually differentiated pressed and unpressed states, similar to TOGGLE gadgets.

Buttons with Pixmaps

For these buttons, the Unselected and Selected pixmaps swap whenever the button is pressed, so alternating between the two images in the pressed and un-pressed states.

Textual Buttons

Toggle buttons will highlight when pressed. For example on toolbars they will turn from blue to orange when pressed, and go back to blue again when un-pressed.

The syntax to select the new mode is toggle, which can be anywhere after the button name and before the button control type or associated form, for example,

Button .B1 TOGGLE pixmap /Unselected.png /Selected.png /

Inactive.png width 16 height 16 tooltip...

The button’s value-member !button.val is a BOOLEAN and reflects the button’s state, having the value TRUE when the button is pressed and FALSE when it is not.

Related Links
TitleResults for “How to create a CRG?”Also Available in