BaseListBoxControl.HotTrackSelectMode Property

Gets or sets how items are selected when item hot-tracking is enabled.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v21.2.dll

Declaration

[DXCategory("Behavior")]
[DefaultValue(HotTrackSelectMode.SelectItemOnHotTrack)]
public virtual HotTrackSelectMode HotTrackSelectMode { get; set; }

Property Value

Type Default Description
HotTrackSelectMode

SelectItemOnHotTrack

A HotTrackSelectMode value that specifies how items are selected.

Available values:

Name Description
SelectItemOnHotTrack

If item hot-tracking is enabled, an item is selected when hovering over it with the mouse.

SelectItemOnClick

If item hot-tracking is enabled, an item is selected when clicked. This option is not in effect if the BaseListBoxControl.HighlightedItemStyle property is set to HighlightStyle.Standard.

SelectItemOnHotTrackEx

The same as the HotTrackSelectMode.SelectItemOnHotTrack option plus the following.

If item skinning is enabled via the BaseListBoxControl.HighlightedItemStyle option, the BaseListBoxControl.SelectedIndexChanged event is raised each time an item is hot-tracked. In HotTrackSelectMode.SelectItemOnHotTrack mode, the BaseListBoxControl.SelectedIndexChanged event is raised only when clicking the item.

Remarks

To enable item hot-tracking, set the BaseListBoxControl.HotTrackItems property to true, and ensure that multiple item selection is disabled (see BaseListBoxControl.SelectionMode). The HotTrackSelectMode and BaseListBoxControl.HighlightedItemStyle properties specify the way hot-tracked items are selected.

The following describes selection specifics when item hot-tracking is enabled.

The currently selected item can be obtained from the BaseListBoxControl.SelectedItem property. Additionally, depending on your logic, you can handle the BaseListBoxControl.SelectedIndexChanged event to respond to selection changes. However, note that this event is not automatically triggered during item selection in certain cases, as shown in the table below.

HighlightedItemStyle value

Default/Skinned

Standard

HotTrackSelectMode value

SelectItemOnClick

SelectItemOnHotTrack

SelectItemOnHotTrackEx

SelectItemOnHotTrack/

SelectItemOnClick

SelectItemOnHotTrackEx

SelectedItem property changes…

on a click

on hot-tracking

on hot-tracking

on hot-tracking

on hot-tracking

SelectedIndexChanged event fires…

on a click

on a click

on hot-tracking

on a click

on hot-tracking

Item is immediately selected once it is hot-tracked

No

Yes

Yes

Yes

Yes

See Also