System.Windows.Forms.ListBox.Text Property

Gets or searches for the text of the currently selected item in the System.Windows.Forms.ListBox.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.Bindable(false)]
public override string Text { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the value of this property is set to a string value, the System.Windows.Forms.ListBox searches for the item within the System.Windows.Forms.ListBox that matches the specified text and selects the item. You can also use this property to determine which items are currently selected in the System.Windows.Forms.ListBox. If the ListBox.SelectionMode property of the System.Windows.Forms.ListBox is set to SelectionMode.MultiExtended, this property returns the text of the first selected item. If the ListBox.SelectionMode property of the System.Windows.Forms.ListBox is not set to SelectionMode.None, this property returns the text of the first selected item.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0