Description | Hierarchy | Fields | Methods | Properties |
type TArgusDataEntry = class(TComboBox)
EArgusMinMaxError is raised if there is an attempt to set the Max to a value less than Min or vice versa.
![]() |
FOutput: string; |
![]() |
FDataType: TDataType; |
![]() |
FMax: extended; |
![]() |
FMin: extended; |
![]() |
FCheckMax: boolean; |
![]() |
FCheckMin: boolean; |
![]() |
FOnStyleChanged: TNotifyEvent; |
![]() |
FOnDataTypeChanged: TNotifyEvent; |
![]() |
FOnExceededBounds: TNotifyEvent; |
![]() |
FOnExceedingBounds: TNotifyEvent; |
![]() |
FStyle: TComboBoxStyle; |
![]() |
FChangeDisabledColor: boolean; |
![]() |
FDisabledColor: TColor; |
![]() |
FEnabledColor: TColor; |
![]() |
FDecimalDelimiter: Char; |
![]() |
FAppEvents: TApplicationEvents; |
![]() |
function GetText: TCaption; |
![]() |
procedure SetText(const Value: TCaption); |
![]() |
procedure LocalizeString(var ANumberString : string); |
![]() |
function ReadOutput : string ; |
![]() |
function LocalStrToFloat(const S: string): Extended; |
![]() |
procedure SetChangeDisabledColor(const Value: boolean); |
![]() |
procedure SetDisabledColor(const Value: TColor); |
![]() |
procedure SetEnabledColor(Value: TColor); |
![]() |
function GetRealValue: Double; |
![]() |
procedure SetRealValue(const Value: Double); |
![]() |
function GetIntegerValue: Integer; |
![]() |
procedure SetIntegerValue(const Value: Integer); |
![]() |
procedure SetDataType(ADataType : TDataType); virtual; |
![]() |
procedure SetEnabled(Value: Boolean); override; |
![]() |
procedure SetStyle(Value: TComboBoxStyle); 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 StyleChanged; dynamic; |
![]() |
procedure DataTypeChanged; dynamic; |
![]() |
procedure ExceedingBounds; dynamic; |
![]() |
procedure ExceededBounds; dynamic; |
![]() |
procedure TextChanged; virtual; |
![]() |
procedure ChangeColor; |
![]() |
procedure SettingsChanged(Sender: TObject; Flag: Integer; const Section: string; var Result: Longint); |
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
function ChangeTextToInteger : String; virtual; |
![]() |
function ChangeTextToReal : string; virtual; |
![]() |
function ChangeTextToBoolean : string; virtual; |
![]() |
procedure CheckRange; virtual; |
![]() |
property RealValue: Double read GetRealValue write SetRealValue; |
![]() |
property IntegerValue: Integer read GetIntegerValue write SetIntegerValue; |
![]() |
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 Style: TComboBoxStyle read FStyle write SetStyle default csSimple; |
![]() |
property OnStyleChanged : TNotifyEvent read FOnStyleChanged write FOnStyleChanged ; |
![]() |
property OnDataTypeChanged : TNotifyEvent read FOnDataTypeChanged write FOnDataTypeChanged ; |
![]() |
property OnExceededBounds : TNotifyEvent read FOnExceededBounds write FOnExceededBounds ; |
![]() |
property OnExceedingBounds : TNotifyEvent read FOnExceedingBounds write FOnExceedingBounds ; |
![]() |
property Text: TCaption read GetText write SetText; |
![]() |
property ChangeDisabledColor : boolean read FChangeDisabledColor write SetChangeDisabledColor; |
![]() |
property DisabledColor : TColor read FDisabledColor write SetDisabledColor
default clBtnFace; |
![]() |
property EnabledColor: TColor read FEnabledColor write SetEnabledColor
default clWindow; |
![]() |
FOutput: string; |
Private declarations |
![]() |
FDataType: TDataType; |
![]() |
FMax: extended; |
![]() |
FMin: extended; |
![]() |
FCheckMax: boolean; |
![]() |
FCheckMin: boolean; |
![]() |
FOnStyleChanged: TNotifyEvent; |
![]() |
FOnDataTypeChanged: TNotifyEvent; |
![]() |
FOnExceededBounds: TNotifyEvent; |
![]() |
FOnExceedingBounds: TNotifyEvent; |
![]() |
FStyle: TComboBoxStyle; |
![]() |
FChangeDisabledColor: boolean; |
![]() |
FDisabledColor: TColor; |
![]() |
FEnabledColor: TColor; |
![]() |
FDecimalDelimiter: Char; |
![]() |
FAppEvents: TApplicationEvents; |
![]() |
function GetText: TCaption; |
![]() |
procedure SetText(const Value: TCaption); |
![]() |
procedure LocalizeString(var ANumberString : string); |
function GetDecChar : char; |
![]() |
function ReadOutput : string ; |
![]() |
function LocalStrToFloat(const S: string): Extended; |
![]() |
procedure SetChangeDisabledColor(const Value: boolean); |
![]() |
procedure SetDisabledColor(const Value: TColor); |
![]() |
procedure SetEnabledColor(Value: TColor); |
![]() |
function GetRealValue: Double; |
![]() |
procedure SetRealValue(const Value: Double); |
![]() |
function GetIntegerValue: Integer; |
![]() |
procedure SetIntegerValue(const Value: Integer); |
![]() |
procedure SetDataType(ADataType : TDataType); virtual; |
function GetText: TCaption; procedure SetText(const Value: TCaption); |
![]() |
procedure SetStyle(Value: TComboBoxStyle); override; |
SetEnabled calls the inherited SetEnabled and then ChangeColor |
![]() |
procedure SetMin(Value : extended); virtual; |
SetMax changes Max and then calls CheckRange |
![]() |
procedure SetCheckMax(Value : boolean); virtual; |
SetMin changes Min and then calls CheckRange |
![]() |
procedure SetCheckMin(Value : boolean); virtual; |
SetCheckMax changes CheckMax and then if CheckMax is true calls CheckRange |
![]() |
procedure DoExit ; override; |
SetCheckMin changes CheckMin and then if CheckMin is true calls CheckRange |
![]() |
procedure Change; override; |
DoExit implements the OnExit event; It calls the inherited method and then CheckRange |
![]() |
procedure StyleChanged; dynamic; |
Change implements the OnChange event; It calls the inherited method and then TextChanged. |
![]() |
procedure DataTypeChanged; dynamic; |
StyleChanged implements the OnStyleChanged event; It is called whenever the application changes the data type. |
![]() |
procedure ExceedingBounds; dynamic; |
DataTypeChanged implements the OnDataTypeChanged event; |
![]() |
procedure ExceededBounds; dynamic; |
ExceedingBounds implements the OnExceedingBounds event; |
![]() |
procedure TextChanged; virtual; |
StyleChanged implements the OnStyleChanged event; |
![]() |
constructor Create(AOwner: TComponent); override; |
Public declarations |
![]() |
function ChangeTextToInteger : String; virtual; |
Create creates and initializes a TArgusDataEntry instance. |
![]() |
procedure CheckRange; virtual; |
ChangeTextToBoolean converts the string in the Text property to '0' if the Text is '', '0' or 'false'. The check that the Text is equal to 'false' is case insensitive. |
![]() |
property RealValue: Double read GetRealValue write SetRealValue; |
CheckRange is called before the event handler for the OnExit event. It checks that the data in the TArgusDataEntry do not exceed the specified limits. However, it only checks the range if the DataType is dtInteger or dtReal. It also catches the invalid value of '-' for real and integer data typed in the text field. If the value in the data field should be checked as specified by CheckMin and CheckMax and is outside the limits set by Min and Max an OnExceedingBounds event occurs. If after the eventhandler for OnExceedingBounds, the numeric representation of Text is still outside the appropriate range, Text will be changed to Max or Min, whichever is closer and raises an OnExceededBounds event. |
![]() |
property IntegerValue: Integer read GetIntegerValue write SetIntegerValue; |
![]() |
property DataType: TDataType read FDataType write SetDataType default dtString; |
Published declarations |
![]() |
property Max : extended read FMax write SetMax; |
Set the DataType to an appropriate value to cause the TArgusDataEntry to check that user-entered data is the appropriate type. |
![]() |
property Min : extended read FMin write SetMin; |
If CheckMax is true and the DataType is dtInteger or dtReal, the TArgusDataEntry will check the data entered and change it to Max if the entered value is larger than Max. It will also beep and set the focus to the TArgusDataEntry. To modify this behaviour, you can use the OnExceedingBounds or OnExceededBounds events. |
![]() |
property CheckMax: boolean read FCheckMax write SetCheckMax default False; |
If CheckMin is true and the DataType is dtInteger or dtReal, the TArgusDataEntry will check the data entered and change it to Min if the entered value is smaller than Max. It will also beep and set the focus to the TArgusDataEntry. To modify this behaviour, you can use the OnExceedingBounds or OnExceededBounds events. |
![]() |
property CheckMin: boolean read FCheckMin write SetCheckMin default False; |
If CheckMax is true and the DataType is dtInteger or dtReal, the TArgusDataEntry will check the data entered and change it to Max if the entered value is larger than Max. It will also beep and set the focus to the TArgusDataEntry. To modify this behaviour, you can use the OnExceedingBounds or OnExceededBounds events. |
![]() |
property Output: string read ReadOutput ; |
If CheckMin is true and the DataType is dtInteger or dtReal, the TArgusDataEntry will check the data entered and change it to Min if the entered value is smaller than Min. It will also beep and set the focus to the TArgusDataEntry. To modify this behaviour, you can use the OnExceedingBounds or OnExceededBounds events. |
![]() |
property Style: TComboBoxStyle read FStyle write SetStyle default csSimple; |
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 OnStyleChanged : TNotifyEvent read FOnStyleChanged write FOnStyleChanged ; |
Style is inherited but the default is changed to csSimple. |
![]() |
property OnDataTypeChanged : TNotifyEvent read FOnDataTypeChanged write FOnDataTypeChanged ; |
Whenever the Style Property is changed, an OnStyleChanged event occurs. |
![]() |
property OnExceededBounds : TNotifyEvent read FOnExceededBounds write FOnExceededBounds ; |
Whenever the DataType Property is changed, an OnDataTypeChanged event occurs. |
![]() |
property OnExceedingBounds : TNotifyEvent read FOnExceedingBounds write FOnExceedingBounds ; |
An OnExceededBounds event occurs if 1. the DataType is dtInteger or dtReal and either 2. CheckMax is true and the numeric representation of the Text Property exceeds the Max Property or 3. CheckMin is true and the numeric representation of the Text Property is less than the Min Property. OnExceededBounds occurs after the default handling of such cases has occurred. CheckRange will be called again after your event handler. Be careful that your custom handling does not result in an infinite loop. |
![]() |
property Text: TCaption read GetText write SetText; |
Property Text : TCaption read GetText Write SetText ; |
![]() |
property ChangeDisabledColor : boolean read FChangeDisabledColor write SetChangeDisabledColor; |
Identical to original Text property except that setting the text generates an OnChange Event. |
![]() |
property DisabledColor : TColor read FDisabledColor write SetDisabledColor
default clBtnFace; |
If ChangeDisabledColor is true, the color of the control will be changed to EnabledColor when the control becomes enabled and will be set to DisabledColor when the control becomes disabled. |
![]() |
property EnabledColor: TColor read FEnabledColor write SetEnabledColor
default clWindow; |
DisabledColor is the color that the control will be changed to if ChangeDisabledColor is true and the control becomes disabled. By default, DisabledColor is clBtnFace. |