getTextAsCurrencyReal(): Real;
The getTextAsCurrencyReal method returns the text from the text property of a TextBox control in currency format converted to a
If the text box is empty, zero (0) is returned. If the text of a TextBox control is not a valid numeric string in the locale of the user application, an exception is raised. You should therefore use this method only for a numeric text box (that is, the dataType property value of DataType_Numeric (1), DataType_SignedNumeric (2), or DataType_Currency (3)) that guarantees that the text is a valid numeric. The text can be valid but incomplete (for details, see the isValid method).
When the
A numeric TextBox control expects the negative sign and decimal place characters to be in the form defined for the locale under which the user is running. This applies when accessing the text property and when the user enters data.
Setting text by using the setTextFromCurrencyReal method converts the numeric into the appropriate string for that locale. Retrieving the currency
The position of a negative sign indicated by the locale is honored by a leading or trailing numeric in the TextBox control. However, locales that specify a negative value expressed by parentheses (for example, (123)) are treated as a leading dash symbol (-). In addition, locales that have a leading or trailing space associated with a negative sign are treated as the equivalent format without the space; for example, (- 123 will be -123 and 123 - will be 123-).