Class TCastleCheckbox
Unit
Declaration
type TCastleCheckbox = class(TCastleUserInterface)
Description
Checkbox with a caption.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleUserInterface
- TCastleCheckbox
Overview
Fields
nested const DefaultCaptionMargin = 10; |
|
nested const DefaultCheckboxSize = 24; |
Methods
procedure PreferredSize(var PreferredWidth, PreferredHeight: Single); override; |
|
function GetInternalText: String; override; |
|
procedure SetInternalText(const Value: String); override; |
|
procedure DoChange; virtual; |
|
procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); override; |
|
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
function Press(const Event: TInputPressRelease): boolean; override; |
|
function Release(const Event: TInputPressRelease): boolean; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
procedure EditorAllowResize( out ResizeWidth, ResizeHeight: Boolean; out Reason: String); override; |
Properties
property TextColor: TCastleColor read FTextColor write SetTextColor; |
|
property CheckboxColor: TCastleColor read FCheckboxColor write SetCheckboxColor; |
|
property Checked: Boolean read FChecked write SetChecked default false; |
|
property Caption: String read FCaption write SetCaption; |
|
property CaptionTranslate: Boolean read FCaptionTranslate write FCaptionTranslate default true; |
|
property CaptionMargin: Single read FCaptionMargin write SetCaptionMargin
default DefaultCaptionMargin; |
|
property OnChange: TNotifyEvent read FOnChange write FOnChange; |
|
property AutoSize: Boolean read FAutoSize write SetAutoSize default true; |
|
property FontSize: Single read FFontSize write SetFontSize default 0.0; |
|
property CheckboxSize: Single read FCheckboxSize write SetCheckboxSize
default DefaultCheckboxSize; |
|
property CustomFont: TCastleAbstractFont
read GetCustomFont write SetCustomFont; |
|
property TextColorPersistent: TCastleColorPersistent read FTextColorPersistent ; |
|
property CheckboxColorPersistent: TCastleColorPersistent read FCheckboxColorPersistent ; |
Description
Fields
nested const DefaultCaptionMargin = 10; |
|
nested const DefaultCheckboxSize = 24; |
|
Methods
procedure PreferredSize(var PreferredWidth, PreferredHeight: Single); override; |
|
function GetInternalText: String; override; |
|
procedure SetInternalText(const Value: String); override; |
|
procedure DoChange; virtual; |
|
procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); override; |
|
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
function Press(const Event: TInputPressRelease): boolean; override; |
|
function Release(const Event: TInputPressRelease): boolean; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
procedure EditorAllowResize( out ResizeWidth, ResizeHeight: Boolean; out Reason: String); override; |
|
Properties
property TextColor: TCastleColor read FTextColor write SetTextColor; |
|
Color of the label. By default opaque black. |
property CheckboxColor: TCastleColor read FCheckboxColor write SetCheckboxColor; |
|
Color of the checkbox square and checkmark. By default opaque black. |
property Checked: Boolean read FChecked write SetChecked default false; |
|
property Caption: String read FCaption write SetCaption; |
|
property CaptionTranslate: Boolean read FCaptionTranslate write FCaptionTranslate default true; |
|
Should the Caption be localized (translated into other languages). Determines if the property is enumerated by TCastleComponent.TranslateProperties, which affects the rest of localization routines. |
property CaptionMargin: Single read FCaptionMargin write SetCaptionMargin
default DefaultCaptionMargin; |
|
Margin between checkbox square and a text Caption. |
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. |
property AutoSize: Boolean read FAutoSize write SetAutoSize default true; |
|
Should our size be determined by checkbox image size and caption. |
property FontSize: Single read FFontSize write SetFontSize default 0.0; |
|
Caption font size. |
property CheckboxSize: Single read FCheckboxSize write SetCheckboxSize
default DefaultCheckboxSize; |
|
Size of the square checkbox. |
property CustomFont: TCastleAbstractFont
read GetCustomFont write SetCustomFont; |
|
Font used for the caption. When this is |
property TextColorPersistent: TCastleColorPersistent read FTextColorPersistent ; |
|
TextColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write TextColor directly. See also
|
property CheckboxColorPersistent: TCastleColorPersistent read FCheckboxColorPersistent ; |
|
CheckboxColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write CheckboxColor directly. See also
|
Generated by PasDoc 0.16.0.