Table of Contents

TTMSFNCSwitch Class

Toggle switch control with separate on and off appearance settings and an animated sliding button. Set Active to toggle the state programmatically or let the user click to toggle.

API unit family: TMSFNCSwitch Inherits from: TTMSFNCCustomSwitch

Syntax

TTMSFNCSwitch = class(TTMSFNCCustomSwitch)

Properties

Name Description
AnimationFactor Speed factor used for state-change animation. (inherited from TTMSFNCCustomSwitch)
AppearanceOff Appearance settings used when the switch is off. (inherited from TTMSFNCCustomSwitch)
AppearanceOn Appearance settings used when the switch is on. (inherited from TTMSFNCCustomSwitch)
ButtonAppearance Appearance settings for the switch thumb. (inherited from TTMSFNCCustomSwitch)
Checked When True, the switch is in the on state. (inherited from TTMSFNCCustomSwitch)
GlobalFont Global font settings applied to switch labels. (inherited from TTMSFNCCustomSwitch)
Layout Layout used for the switch track and optional state labels. (inherited from TTMSFNCCustomSwitch)
Orientation Orientation used to draw and operate the switch. (inherited from TTMSFNCCustomSwitch)
Rounded When True, the switch track and thumb are drawn with rounded ends. (inherited from TTMSFNCCustomSwitch)
State Current switch state. (inherited from TTMSFNCCustomSwitch)

Events

Name Description
OnAfterDrawSwitch Fires after the switch track has been drawn. (inherited from TTMSFNCCustomSwitch)
OnAfterDrawSwitchButton Fires after the switch thumb has been drawn. (inherited from TTMSFNCCustomSwitch)
OnBeforeDrawSwitch Fires before the switch track is drawn. (inherited from TTMSFNCCustomSwitch)
OnBeforeDrawSwitchButton Fires before the switch thumb is drawn. (inherited from TTMSFNCCustomSwitch)
OnChange Fires when switch settings or state change. (inherited from TTMSFNCCustomSwitch)
OnStateChange Fires when the switch changes between off and on states. (inherited from TTMSFNCCustomSwitch)

Used by