Official Content

The Switch control is presented as a toggle that allows selecting one of two possible values: on or off. 

It is one of the built-in controls and can be selected from the Control Type property.

It may be used as a replacement for the traditional Check Box control, and it's available for Panel objects and for Web Panel objects.

Web Panels

Only the Abstract Layout supports this control.

i2016_02_12_16_50_481_png

i2016_02_17_17_02_473_png

Panels

iOS_Switch_Control

Switch control type SD

How to change the appearance of the control

As of GeneXus 17 Upgrade 5, both Web and Native Mobile applications support configuring the visual aspect of the control via a Theme Class.

i2016_02_17_17_00_001_png

i2016_02_17_17_01_092_png

Properties

Name Description
Auto Grow (only for Native Mobile apps) Auto Grow property
Checked Value Indicates the "switch on" value
Unchecked Value Indicates the "switch off" value
ON Text (only for Web apps) Indicates the text displayed when the ON value is selected
OFF Text (only for Web apps) Indicates the text displayed when the OFF value is selected

Events

ControlValueChanged event

Compatibility notes

The ValueChanged event for the Switch control in iOS has been deprecated. The ControlValueChanged event must be used instead.

Last update: November 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant