windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemlookupedit-86bae77e.md
Gets or sets the maximum number of characters displayed in the edit box.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Browsable(false)]
[DefaultValue(255)]
[DXCategory("Behavior")]
public int MaxDisplayTextLength { get; set; }
<DXCategory("Behavior")>
<DefaultValue(255)>
<Browsable(False)>
Public Property MaxDisplayTextLength As Integer
| Type | Default | Description |
|---|---|---|
| Int32 | 255 |
The maximum number of characters displayed in the edit box. The minimum value is 10.
|
This property works in Multiple Item Selection mode only. If the total number of characters in the edit box exceeds the MaxDisplayTextLength, the editor displays the ellipsis after the last item. The LookUpEdit displays the last item completely even if it does not fully fit the MaxDisplayTextLength.
public Form1() {
// ...
lookUpEdit1.Properties.DataSource = Employee.GetSampleData();
lookUpEdit1.Properties.DisplayMember = "FullName";
lookUpEdit1.Properties.ValueMember = "ID";
lookUpEdit1.Properties.EditValueType = DevExpress.XtraEditors.Repository.LookUpEditValueType.ValueList;
lookUpEdit1.Properties.MaxDisplayTextLength = 15;
}
Public Sub New()
' ...
lookUpEdit1.Properties.DataSource = Employee.GetSampleData()
lookUpEdit1.Properties.DisplayMember = "FullName"
lookUpEdit1.Properties.ValueMember = "ID"
lookUpEdit1.Properties.EditValueType = DevExpress.XtraEditors.Repository.LookUpEditValueType.ValueList
lookUpEdit1.Properties.MaxDisplayTextLength = 15
End Sub
See Also
RepositoryItemLookUpEdit Class