Class TStateDialogInput

Unit

Declaration

type TStateDialogInput = class(TStateDialog)

Description

Ask user to input a string, or cancel. See unit CastleDialogStates documentation for example usage.

Hierarchy

Overview

Methods

Protected procedure InitializeButtons(var Buttons: TButtonArray); override;
Protected function DrawInputText: boolean; override;
Public function Press(const Event: TInputPressRelease): boolean; override;

Properties

Public property AllowedChars: TSetOfChars read FAllowedChars write FAllowedChars;
Public property MinLength: Cardinal read FMinLength write FMinLength default 0;
Public property MaxLength: Cardinal read FMaxLength write FMaxLength default 0;
Public property CanCancel: boolean read FCanCancel write FCanCancel default false;
Public property AnswerCancelled: boolean read FAnswerCancelled;
Public property Answer: string read GetAnswer write SetAnswer;

Description

Methods

Protected procedure InitializeButtons(var Buttons: TButtonArray); override;
 
Protected function DrawInputText: boolean; override;
 
Public function Press(const Event: TInputPressRelease): boolean; override;
 

Properties

Public property AllowedChars: TSetOfChars read FAllowedChars write FAllowedChars;

Allowed characters that user can input.

Public property MinLength: Cardinal read FMinLength write FMinLength default 0;

Min length of user input.

Public property MaxLength: Cardinal read FMaxLength write FMaxLength default 0;

Max length of user input. Value of 0 (default) means "no limit".

Public property CanCancel: boolean read FCanCancel write FCanCancel default false;

User can cancel the input by pressing a button like "cancel".

Public property AnswerCancelled: boolean read FAnswerCancelled;

User clicked "cancel" instead of accepting an answer. This is defined only when Answered. This is possible only if CanCancel.

Public property Answer: string read GetAnswer write SetAnswer;

The user input. May be set before starting the state. After the state stopped, if Answered, then this contains user answer. You should ignore it if AnswerCancelled.


Generated by PasDoc 0.16.0.