ListView.HoverSelection Property

Definition

获取或设置一个值,该值指示当鼠标指针在项上停留几秒钟时是否自动选定该项。Gets or sets a value indicating whether an item is automatically selected when the mouse pointer remains over the item for a few seconds.

public:
 property bool HoverSelection { bool get(); void set(bool value); };
public bool HoverSelection { get; set; }
member this.HoverSelection : bool with get, set
Public Property HoverSelection As Boolean

Property Value

Boolean

如果在鼠标指针悬停于项上时自动选择项,则为 true;否则,为 falsetrue if an item is automatically selected when the mouse pointer hovers over it; otherwise, false. 默认为 falseThe default is false.

Remarks

当此属性设置为 true时,用户可以指向 ListView 控件中的项以选择项。When this property is set to true, the user can point to an item in the ListView control to select the item. 通过按住 CTRL 键的同时指向每个项,可以选择多个项(如果 MultiSelect 属性设置为 "true")。Multiple items can be selected (when the MultiSelect property is set to true) by holding down the CTRL key while pointing to each item. 您可以使用此功能为应用程序用户提供一种更简单的方法来选择 ListView 控件中的项。You can use this feature to provide an easier method for the user of your application to select items in the ListView control.

Applies to