System.Windows.Forms.ComboBox.Text Property

Gets or sets the text associated with this control.

Syntax

[System.ComponentModel.Localizable(true)]
[System.ComponentModel.Bindable(true)]
public override string Text { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Setting the ComboBox.Text property to null or an empty string ("") sets the ComboBox.SelectedIndex to -1. Setting the ComboBox.Text property to a value that is in the ComboBox.Items collection sets the ComboBox.SelectedIndex to the index of that item. Setting the ComboBox.Text property to a value that is not in the collection leaves the ComboBox.SelectedIndex unchanged.

Requirements

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