ComboBox の編集できる部分で選択されているテキストを取得または設定します。
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);
プロパティ値
コンボ ボックスで現在選択されているテキストを表す文字列。 DropDownStyle が ComboBoxStyle.DropDownList に設定されている場合は、空の文字列 ("") が返されます。
解説
このプロパティにテキストを代入すると、コンボ ボックスで現在選択されているテキストを変更できます。コンボ ボックスでテキストが選択されていない場合は、このプロパティは長さ 0 の文字列を返します。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ