The TextBox control now provides the properties listed in the following table.
Property | Value | Default | Description |
---|---|---|---|
hintText | String | An empty string | Text that is displayed in an empty text box as a hint |
hintBackColor | Integer | #80000000 (use the defined backColor value) | Background color of hint text |
hintForeColor | Integer | #80000000 (use the defined foreColor value) | Color of the hint text |
If the value of the hintText property is:
Empty, these properties have no impact on the text box display
Not empty, the specified hint text is displayed in the text box when the value of the text property is empty
When the value of the hintText property is displayed, the:
text and selText properties both continue to return an empty string
Text cannot be selected or deleted, and the cursor is always positioned at the beginning of the text
As soon as text is entered or pasted into the text box, the hint text is removed and replaced with the specified or pasted text. If the entire text is removed, the hint text is displayed again.
When hint text is displayed, the:
Back ground of the text box is drawn using the value of the hintBackColor property except when it is #80000000, in which case the TextBox control backColor property value is used.
Text of the text box is drawn using the value of the hintForeColor property except when it is #80000000, in which case the TextBox control foreColor property value is used.
The values of the dataType, case, and selectionStyle properties are ignored when the hint text is displayed; for example, hint text can be displayed for a numeric field. The hint text, which is always displayed in the case of its defined string, can never be selected. In addition, for a password text box, the hint text is displayed as clear text (that is, it is not displayed using asterisk (*) characters).
When the value of the hintBackColor or hintForeColor property is #80000000, the value of the respective hintBackColor or hintForeColor property in the JADE Painter Properties dialog is displayed as Use backColor Value or Use foreColor Value, with an image at the left of the text displaying the current value of the respective backColor or foreColor property. The combo box drop‑down list of colors includes an entry for Use backColor Value or Use foreColor Value that sets the property value to the default.
If the values of the hintBackColor and hintForeColor properties are both zero (0), the default values of #80000000 (that is, transparent) are used instead, to allow for the handling of existing text box definitions from earlier releases.