← Back to Index

TFlexFMXAdvancedSwitch

Modern toggle switch with ON/OFF states, smooth animations, and customizable appearance.

Key Properties

IsOn: Boolean
Gets or sets the switch state (True = ON, False = OFF).
ThumbColor: TAlphaColor
Color of the sliding thumb/handle.
TrackOnColor: TAlphaColor
Background color when switch is ON.
TrackOffColor: TAlphaColor
Background color when switch is OFF.
OnLabel: string
Text displayed on the left when switch is ON.
OffLabel: string
Text displayed on the right when switch is OFF.

Usage Example

Switch1.IsOn := True;
Switch1.TrackOnColor := TAlphaColors.Green;
Switch1.TrackOffColor := TAlphaColors.Gray;
Switch1.OnLabel := 'ON';
Switch1.OffLabel := 'OFF';

Events

← Back to Index