windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemtextedit-21cf4579.md
Gets or sets whether the focused editor displays a prompt when its value is not specified.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShowNullValuePromptWhenFocused { get; set; }
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Property ShowNullValuePromptWhenFocused As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true if the focused editor displays a prompt when its value is not specified; otherwise, false.
|
The editor can display a prompt when its value is not specified. Use the NullValuePrompt property to specify the prompt.
textEdit1.Properties.NullValuePrompt = "Enter text to search...";
textEdit1.Properties.NullValuePrompt = "Enter text to search..."
The ShowNullValuePrompt property provides access to the following flags that specify when the prompt is shown:
The prompt disappears when the user clicks the focused editor or starts to enter a value. The prompt does not appear again if the user clears the entered value.
You can specify the flags in the Properties window.
The snippet below shows how to specify the flags in code.
textEdit1.Properties.ShowNullValuePrompt =
ShowNullValuePromptOptions.EditorFocused | ShowNullValuePromptOptions.EmptyValue;
textEdit4.Properties.ShowNullValuePrompt =
ShowNullValuePromptOptions.EditorFocused Or ShowNullValuePromptOptions.EmptyValue
Note
Since version 19.2, all options are enabled — the default value is Default. For previous versions, all options are disabled — the default value is NullValue.
See Version Compatibility: Default Property Values for more information about changes introduced in specific versions.
See Also