Export (0) Print
Expand All
0 out of 2 rated this helpful - Rate this topic

ComboBox.SelectedText Property

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

[Visual Basic]
Public Property SelectedText As String
[C#]
public string SelectedText {get; set;}
[C++]
public: __property String* get_SelectedText();
public: __property void set_SelectedText(String*);
[JScript]
public function get SelectedText() : String;
public function set SelectedText(String);

Property Value

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

Remarks

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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ComboBox Class | ComboBox Members | System.Windows.Forms Namespace

Show:
© 2014 Microsoft. All rights reserved.