Back to Devexpress

TextEditAdvancedModeOptions.Label Property

windowsforms-devexpress-dot-xtraeditors-dot-texteditadvancedmodeoptions-fe070273.md

latest3.5 KB
Original Source

TextEditAdvancedModeOptions.Label Property

Gets or sets the caption of the embedded editor label. TextEdit-based editors can have embedded labels only when in Advanced Mode. See this property for more information about this mode: RepositoryItemTextEdit.UseAdvancedMode.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue("")]
[DXCategory("Appearance")]
public virtual string Label { get; set; }
vb
<DXCategory("Appearance")>
<DefaultValue("")>
Public Overridable Property Label As String

Property Value

TypeDefaultDescription
StringString.Empty

The embedded editor label’s caption.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to Label
RepositoryItemTextEdit

.AdvancedModeOptions .Label

|

Remarks

Use the Label property to specify an editor caption inside the text box in advanced mode. This caption moves/shifts upwards when the editor is focused.

Example

Note

You must set the UseAdvancedTextEdit property before the Form’s handle is created.

Enable the static WindowsFormsSettings.UseAdvancedTextEdit property to activate Advanced Mode for all TextEdit-based editors in your application.

csharp
public partial class Form1 : DevExpress.XtraEditors.XtraForm {
    public Form1() {
        InitializeComponent();
        textEdit1.Properties.UseAdvancedMode = DevExpress.Utils.DefaultBoolean.True;
        textEdit1.Properties.AdvancedModeOptions.Label = "Product Name";
    }
}
vb
Partial Public Class Form1
    Inherits DevExpress.XtraEditors.XtraForm

    Public Sub New()
        InitializeComponent()
        textEdit1.Properties.UseAdvancedMode = DevExpress.Utils.DefaultBoolean.True
        textEdit1.Properties.AdvancedModeOptions.Label = "Product Name"
    End Sub
End Class

See Also

UseAdvancedMode

UseAdvancedTextEdit

TextEditAdvancedModeOptions Class

TextEditAdvancedModeOptions Members

DevExpress.XtraEditors Namespace