Control Name | Unit | Class |
Currency Edit | CurrEdit | tCurrencyEdit |
Description:
The TCurrencyEdit
component is a modified TEdit component. CurrencyEdit allows the
user to enter only numeric characters, so the user cannot enter
invalid characters. When the user leaves the field, the number is
reformatted to display appropriately, accordingly with the
DisplayFormat property.
The field value is stored in a Value property so you should read and write to that in your program. This field is of type is Extended. You can also read and write Value as integer number using the AsInteger property.
Property AsInteger
Declaration: AsInteger: Longint;
Run-time only. This is a conversion property. For a TCurrencyEdit and TRxCalcEdit, AsInteger can be used to read or set the Value as a Longint.
Property BeepOnError
Declaration: BeepOnError: Boolean;
BeepOnError determines whether a beep is sounded when an invalid character is entered. If BeepOnError is True, MessageBeep is called when an invalid character is entered or when a character is entered and the field is full.
Property DecimalPlaces
Declaration: DecimalPlaces: Word;
DecimalPlaces is the number of digits that are displayed to the right of the decimal point. This property can be used to set a decimal position that will display a fractional portion of the Value only if one exists and the TCurrencyEdit or the TRxCalcEdit component have focus.
Property DisplayFormat
Declaration: DisplayFormat: string;
The DisplayFormat property is used to format the value of the field for display purposes. Formatting is performed by FloatToTextFmt function.
Property DisplayText
Declaration: DisplayText: string;
Run-time and read-only. The string
value for the field when it is displayed in the TCurrencyEdit or
in the TRxCalcEdit control that is not in edit mode (have not
focus).
NOTE. The Text property always returns unformatted string.
Property MaxValue
Declaration: MaxValue: Extended;
Use this property to specify the maximum value that can be entered.
Property MinValue
Declaration: MinValue: Extended;
Use this property to specify the minimum value that can be entered.
Property Value
Declaration: Value: Extended;
Value is the actual data in a TCurrencyEdit or in a TRxCalcEdit. Use Value to read data directly from and write data directly to an editor. When Text property is empty string, the Value property returns 0 (zero).
Property ZeroEmpty
Declaration: ZeroEmpty: Boolean;
When True and Value property has zero value (0) the focused editor has empty Text property (empty string). When False editor always shows '0' string when Value = 0. The default value is True..
Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000