Class TCastleSwitchControl
Unit
Declaration
type TCastleSwitchControl = class(TCastleUserInterface)
Description
Touch-friendly checkbox control with representing on/off state.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleUserInterface
- TCastleSwitchControl
Overview
Fields
![]() |
nested const DefaultSwitchControlWidth = 50; |
![]() |
nested const DefaultSwitchControlHeight = 28; |
Methods
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
destructor Destroy; override; |
![]() |
procedure Render; override; |
![]() |
function Press(const Event: TInputPressRelease): boolean; override; |
![]() |
function Release(const Event: TInputPressRelease): boolean; override; |
![]() |
function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
![]() |
property IsOn: boolean read FChecked write SetChecked default false; deprecated 'use Checked instead, consistent with LCL TCheckBox.Checked'; |
![]() |
property Checked: boolean read FChecked write SetChecked default false; |
![]() |
property Enabled: boolean read FEnabled write SetEnabled default true; |
![]() |
property OnChange: TNotifyEvent read FOnChange write FOnChange; |
![]() |
property Width default DefaultSwitchControlWidth; |
![]() |
property Height default DefaultSwitchControlHeight; |
Description
Fields
![]() |
nested const DefaultSwitchControlWidth = 50; |
![]() |
nested const DefaultSwitchControlHeight = 28; |
Methods
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
destructor Destroy; override; |
![]() |
procedure Render; override; |
![]() |
function Press(const Event: TInputPressRelease): boolean; override; |
![]() |
function Release(const Event: TInputPressRelease): boolean; override; |
![]() |
function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
![]() |
property Checked: boolean read FChecked write SetChecked default false; |
Switch state. |
![]() |
property Enabled: boolean read FEnabled write SetEnabled default true; |
![]() |
property OnChange: TNotifyEvent read FOnChange write FOnChange; |
Event sent when Checked value was changed by a user click. Note that this is not called when you change Checked property programmatically by setting the property. |
![]() |
property Width default DefaultSwitchControlWidth; |
![]() |
property Height default DefaultSwitchControlHeight; |
Generated by PasDoc 0.16.0.