Properties
RadTextBox shares most of the properties of the standard Windows Forms text box, including:
Property | Description |
---|---|
BackColor | Gets or sets the background color of the control. |
ForeColor | Gets or sets the fore color of the text. |
Text | Gets or sets the current text in the control. |
CharacterCasing | specifies whether the user can type upper-case, lower-case, or both. |
MaxLength | sets the maximum number of characters that can be typed into the control. |
MultiLine | controls whether multiple lines of text can be displayed in the control. |
UseSystemPasswordChar | Gets or sets a value indicating whether the text should appear as the default password character. |
ShowClearButton | Gets or sets a value indicating whether the clear button is shown. |
NullText | Gets or sets the text that is displayed when the textbox contains no text. |
ShowNullText | Gets or sets a value indicating whether the null text will be shown when the control is focused and the text is empty. |
NullText
RadTextBox has a NullText property that is not shared by the standard Windows Forms text box. This property specifies what text to be displayed when the control has no Text value.
Figure 1: Using the null text.
By default, when the control receives focus, this text is automatically removed. This behavior can be controlled by the ShowNullText property. If it is set to true the NullText will be shown even when the text box is focused until you enter some text in the editor.
ShowNullText=false | ShowNullText=true |
---|---|
![]() |
![]() |
Since R1 2017 RadTextBox can show a clear button when there is some text in the editor. This is controlled by the ShowClearButton property.