Class TCastleCheckbox

Unit

Declaration

type TCastleCheckbox = class(TCastleUserInterface)

Description

Checkbox with a caption.

Hierarchy

Overview

Fields

Public nested const DefaultCaptionMargin = 10;
Public nested const DefaultCheckboxSize = 24;

Methods

Protected procedure PreferredSize(var PreferredWidth, PreferredHeight: Single); override;
Protected function GetInternalText: String; override;
Protected procedure SetInternalText(const Value: String); override;
Protected procedure DoChange; virtual;
Protected procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); override;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; 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;
Public procedure EditorAllowResize( out ResizeWidth, ResizeHeight: Boolean; out Reason: String); override;

Properties

Public property TextColor: TCastleColor read FTextColor write SetTextColor;
Public property CheckboxColor: TCastleColor read FCheckboxColor write SetCheckboxColor;
Published property Checked: Boolean read FChecked write SetChecked default false;
Published property Caption: String read FCaption write SetCaption;
Published property CaptionTranslate: Boolean read FCaptionTranslate write FCaptionTranslate default true;
Published property CaptionMargin: Single read FCaptionMargin write SetCaptionMargin default DefaultCaptionMargin;
Published property OnChange: TNotifyEvent read FOnChange write FOnChange;
Published property AutoSize: Boolean read FAutoSize write SetAutoSize default true;
Published property FontSize: Single read FFontSize write SetFontSize default 0.0;
Published property CheckboxSize: Single read FCheckboxSize write SetCheckboxSize default DefaultCheckboxSize;
Published property CustomFont: TCastleAbstractFont read GetCustomFont write SetCustomFont;
Published property TextColorPersistent: TCastleColorPersistent read FTextColorPersistent ;
Published property CheckboxColorPersistent: TCastleColorPersistent read FCheckboxColorPersistent ;

Description

Fields

Public nested const DefaultCaptionMargin = 10;
 
Public nested const DefaultCheckboxSize = 24;
 

Methods

Protected procedure PreferredSize(var PreferredWidth, PreferredHeight: Single); override;
 
Protected function GetInternalText: String; override;
 
Protected procedure SetInternalText(const Value: String); override;
 
Protected procedure DoChange; virtual;
 
Protected procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); override;
 
Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; 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;
 
Public procedure EditorAllowResize( out ResizeWidth, ResizeHeight: Boolean; out Reason: String); override;
 

Properties

Public property TextColor: TCastleColor read FTextColor write SetTextColor;

Color of the label. By default opaque black.

Public property CheckboxColor: TCastleColor read FCheckboxColor write SetCheckboxColor;

Color of the checkbox square and checkmark. By default opaque black.

Published property Checked: Boolean read FChecked write SetChecked default false;
 
Published property Caption: String read FCaption write SetCaption;
 
Published 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.

Published property CaptionMargin: Single read FCaptionMargin write SetCaptionMargin default DefaultCaptionMargin;

Margin between checkbox square and a text Caption.

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.

Published property AutoSize: Boolean read FAutoSize write SetAutoSize default true;

Should our size be determined by checkbox image size and caption.

Published property FontSize: Single read FFontSize write SetFontSize default 0.0;

Caption font size.

Published property CheckboxSize: Single read FCheckboxSize write SetCheckboxSize default DefaultCheckboxSize;

Size of the square checkbox.

Published property CustomFont: TCastleAbstractFont read GetCustomFont write SetCustomFont;

Font used for the caption. When this is Nil then the TCastleContainer.DefaultFont is used, or (when TCastleContainer.DefaultFont is also Nil) the global UIFont.

Published 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
TextColor
Color of the label.
Published 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
CheckboxColor
Color of the checkbox square and checkmark.

Generated by PasDoc 0.16.0.