Description | Hierarchy | Fields | Methods | Properties |
type TRbwDataEntry = class(TEdit)
TRbwDataEntry
provides data checking for user-entered data.
All data entered in a TRbwDataEntry
is first checked to be sure it can be converted to another type of data as specified by the DataType property. In the event that the data can not be converted, characters will be stripped from the end of Text until the conversion is possible. If the DataType is dtInteger or dtReal, it is also possible to check that the numeric representation of Text does not lie outside the range Min..Max. Use CheckMin and CheckMax to turn on or off range checking. OnExceedingBounds and OnExceededBounds can be used to provide custom handling for cases where the data do lie outside the range specified by Min..Max when range checking is on.
![]() |
FOutput: string; |
![]() |
FDataType: TDataType; |
![]() |
FMax: extended; |
![]() |
FMin: extended; |
![]() |
FCheckMax: boolean; |
![]() |
FCheckMin: boolean; |
![]() |
FOnDataTypeChanged: TNotifyEvent; |
![]() |
FOnExceededBounds: TNotifyEvent; |
![]() |
FOnExceedingBounds: TNotifyEvent; |
![]() |
procedure LocalizeString(var ANumberString: string; var ChangedDecimalPosition: integer); |
![]() |
function ReadOutput: string; |
![]() |
function LocalStrToFloat(const S: string): Extended; |
![]() |
procedure SetDataType(ADataType: TDataType); |
![]() |
function GetText: TCaption; override; |
![]() |
procedure Loaded; override; |
![]() |
procedure SetText(const Value: TCaption); override; |
![]() |
procedure SetMax(Value: extended); virtual; |
![]() |
procedure SetMin(Value: extended); virtual; |
![]() |
procedure SetCheckMax(Value: boolean); virtual; |
![]() |
procedure SetCheckMin(Value: boolean); virtual; |
![]() |
procedure DoExit; override; |
![]() |
procedure Change; override; |
![]() |
procedure DataTypeChanged; dynamic; |
![]() |
procedure ExceedingBounds; dynamic; |
![]() |
procedure ExceededBounds; dynamic; |
![]() |
procedure TextChanged; override; |
![]() |
function ChangeTextToInteger(var FirstInvalidPosition: integer): string; virtual; |
![]() |
function ChangeTextToReal(var FirstInvalidPosition: integer): string; virtual; |
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
procedure CheckRange; virtual; |
![]() |
property DataType: TDataType read FDataType write SetDataType default
dtString; |
![]() |
property Max: extended read FMax write SetMax; |
![]() |
property Min: extended read FMin write SetMin; |
![]() |
property CheckMax: boolean read FCheckMax write SetCheckMax default False; |
![]() |
property CheckMin: boolean read FCheckMin write SetCheckMin default False; |
![]() |
property Output: string read ReadOutput; |
![]() |
property Text: TCaption read GetText write SetText; |
![]() |
property OnDataTypeChanged: TNotifyEvent read FOnDataTypeChanged write
FOnDataTypeChanged; |
![]() |
property OnExceededBounds: TNotifyEvent read FOnExceededBounds write
FOnExceededBounds; |
![]() |
property OnExceedingBounds: TNotifyEvent read FOnExceedingBounds write
FOnExceedingBounds; |
![]() |
FOutput: string; |
|
![]() |
FDataType: TDataType; |
|
![]() |
FMax: extended; |
|
![]() |
FMin: extended; |
|
![]() |
FCheckMax: boolean; |
|
![]() |
FCheckMin: boolean; |
|
![]() |
FOnDataTypeChanged: TNotifyEvent; |
|
![]() |
FOnExceededBounds: TNotifyEvent; |
|
![]() |
FOnExceedingBounds: TNotifyEvent; |
|
![]() |
function ReadOutput: string; |
ReadOutput is a string representation of the value represented by Text in which the decimal separator is always a period. |
![]() |
function LocalStrToFloat(const S: string): Extended; |
|
![]() |
procedure SetDataType(ADataType: TDataType); |
See DataType. |
![]() |
function GetText: TCaption; override; |
See Text. |
![]() |
procedure Loaded; override; |
|
![]() |
procedure SetText(const Value: TCaption); override; |
See Text. |
![]() |
procedure SetMax(Value: extended); virtual; |
|
![]() |
procedure SetMin(Value: extended); virtual; |
|
![]() |
procedure SetCheckMax(Value: boolean); virtual; |
|
![]() |
procedure SetCheckMin(Value: boolean); virtual; |
|
![]() |
procedure DoExit; override; |
|
![]() |
procedure Change; override; |
|
![]() |
procedure DataTypeChanged; dynamic; |
|
![]() |
procedure ExceedingBounds; dynamic; |
|
![]() |
procedure ExceededBounds; dynamic; |
|
![]() |
procedure TextChanged; override; |
|
![]() |
function ChangeTextToInteger(var FirstInvalidPosition: integer): string; virtual; |
|
![]() |
function ChangeTextToReal(var FirstInvalidPosition: integer): string; virtual; |
|
![]() |
constructor Create(AOwner: TComponent); override; |
|
![]() |
procedure CheckRange; virtual; |
|
![]() |
property DataType: TDataType read FDataType write SetDataType default
dtString; |
Set the |
![]() |
property Max: extended read FMax write SetMax; |
If CheckMax is true and the DataType is dtInteger or dtReal, the TRbwDataEntry will check the data entered and change it to |
![]() |
property Min: extended read FMin write SetMin; |
If CheckMin is true and the DataType is dtInteger or dtReal, the TRbwDataEntry will check the data entered and change it to |
![]() |
property CheckMax: boolean read FCheckMax write SetCheckMax default False; |
If |
![]() |
property CheckMin: boolean read FCheckMin write SetCheckMin default False; |
If |
![]() |
property Output: string read ReadOutput; |
If the DataType is anything other than dtBoolean, Output will be the same as Text. For dtBoolean, Output is '0' if Text is 'False' and '1' if Text is 'True'. Output is read-only. Output always uses '.' as the decimal separator. |
![]() |
property Text: TCaption read GetText write SetText; |
|
![]() |
property OnDataTypeChanged: TNotifyEvent read FOnDataTypeChanged write
FOnDataTypeChanged; |
Whenever the DataType Property is changed, an |
![]() |
property OnExceededBounds: TNotifyEvent read FOnExceededBounds write
FOnExceededBounds; |
An |
![]() |
property OnExceedingBounds: TNotifyEvent read FOnExceedingBounds write
FOnExceedingBounds; |
An |