Configure a switch
Create and configure a switch to display and set a Boolean value. Adjust properties
for appearance, size, layout, and text.
- InProject view, inUI, right-click a container and select .
- InProperties, underSwitch, setCheckedtoTrue,False, or create a dynamic link to a Boolean value.For more information about dynamic links, see Create dynamic links.
- (optional) InProperties, configureAppearance:
- Visible. Display or hide the object at runtime.
- Enabled. Enable user interaction with the object at runtime.
- Opacity. Set the object opacity from0(transparent) to100(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.
- (optional) InPropertiesor in the editor, configure theSize and layoutsettings.For more information about size and layout properties, see Graphic objects layout.
- (optional) InProperties, configureText and font:
- Text shown if on. Text to display on the switch if the switch is checked. For example, enterON
- Text shown if not on. Text to display on the switch if the switch is not checked. For example, enterOFF
- 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.
- (optional) InEvents, associate a method to execute when theModified valueevent 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.
switch
Boolean
toggle
Provide Feedback