Class TCastleSwitchControl

Unit

Declaration

type TCastleSwitchControl = class(TCastleUserInterface)

Description

Touch-friendly checkbox control with representing on/off state.

Hierarchy

Overview

Fields

Public nested const DefaultSwitchControlWidth = 50;
Public nested const DefaultSwitchControlHeight = 28;

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure Render; override;
Public function Press(const Event: TInputPressRelease): boolean; override;
Public function Release(const Event: TInputPressRelease): boolean; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;

Properties

Public property IsOn: boolean read FChecked write SetChecked default false; deprecated 'use Checked instead, consistent with LCL TCheckBox.Checked';
Published property Checked: boolean read FChecked write SetChecked default false;
Published property Enabled: boolean read FEnabled write SetEnabled default true;
Published property OnChange: TNotifyEvent read FOnChange write FOnChange;
Published property Width default DefaultSwitchControlWidth;
Published property Height default DefaultSwitchControlHeight;

Description

Fields

Public nested const DefaultSwitchControlWidth = 50;
 
Public nested const DefaultSwitchControlHeight = 28;
 

Methods

Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; override;
 
Public procedure Render; override;
 
Public function Press(const Event: TInputPressRelease): boolean; override;
 
Public function Release(const Event: TInputPressRelease): boolean; override;
 
Public function PropertySections(const PropertyName: String): TPropertySections; override;
 

Properties

Public property IsOn: boolean read FChecked write SetChecked default false; deprecated 'use Checked instead, consistent with LCL TCheckBox.Checked';

Warning: this symbol is deprecated: use Checked instead, consistent with LCL TCheckBox.Checked

 
Published property Checked: boolean read FChecked write SetChecked default false;

Switch state.

Published property Enabled: boolean read FEnabled write SetEnabled default true;
 
Published 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.

Published property Width default DefaultSwitchControlWidth;
 
Published property Height default DefaultSwitchControlHeight;
 

Generated by PasDoc 0.16.0.