Configure a switch

Create and configure a switch to display and set a Boolean value. Adjust properties for appearance, size, layout, and text.
  1. In
    Project view
    , in
    UI
    , right-click a container and select
    New
    Base controls
    Switch
    .
  2. In
    Properties
    , under
    Switch
    , set
    Checked
    to
    True
    ,
    False
    , or create a dynamic link to a Boolean value.
    For more information about dynamic links, see Create dynamic links.
  3. (optional) In
    Properties
    , configure
    Appearance
    :
    • Visible
      . Display or hide the object at runtime.
    • Enabled
      . Enable user interaction with the object at runtime.
    • Opacity
      . Set the object opacity from
      0
      (transparent) to
      100
      (opaque).
    • Rotation
      . Rotate the object by a specified number of degrees.
    • Style
      . Select a graphic style to apply for the object.
      For more information about style sheets, see Style sheets.
  4. (optional) In
    Properties
    or in the editor, configure the
    Size and layout
    settings.
    For more information about size and layout properties, see Graphic objects layout.
  5. (optional) In
    Properties
    , configure
    Text and font
    :
    • Text shown if on
      . Text to display on the switch if the switch is checked. For example, enter
      ON
    • Text shown if not on
      . Text to display on the switch if the switch is not checked. For example, enter
      OFF
    • Text color
      . Set color for the text displayed on the switch.
    • Font family
      . Select font family for the text displayed on the switch.
    • Font size
      . Set font size for the text displayed on the switch.
    • Font weight
      . Select font weight for the text displayed on the switch.
    • Font italic
      . Apply italic font to the text displayed on the switch.
  6. (optional) In
    Events
    , associate a method to execute when the
    Modified value
    event occurs.
    For more information on how to associate methods with existing events, see Add a method to an existing event.
    For example, display a panel with information about the switch value.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal