ComboBox.SelectedText Property

Gets or sets the text that is selected in the editable portion of a ComboBox.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public:
property String^ SelectedText {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_SelectedText ()

/** @property */
public void set_SelectedText (String value)

public function get SelectedText () : String

public function set SelectedText (value : String)

Property Value

A string that represents the currently selected text in the combo box. If DropDownStyle is set to DropDownList, the return value is an empty string ("").

You can assign text to this property to change the text currently selected in the combo box. If no text is currently selected in the combo box, this property returns a zero-length string.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show: