ListBox.Text 属性  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或搜索 ListBox 中当前选定项的文本。
public:
 virtual property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public override string Text { get; set; }[<System.ComponentModel.Bindable(false)>]
[<System.ComponentModel.Browsable(false)>]
member this.Text : string with get, setPublic Overrides Property Text As String属性值
控件中当前选定项的文本。
- 属性
注解
当此属性的值设置为字符串值时,搜索 ListBox 与指定文本匹配的项 ListBox 并选择该项。 You can also use this property to determine which items are currently selected in the ListBox. 如果属性SelectionMode设置为 SelectionMode.MultiExtended,ListBox则此属性返回第一个选定项的文本。 如果未将SelectionMode属性设置为SelectionMode.None该属性ListBox,则此属性返回第一个选定项的文本。