Skip to main content

BaseListBoxControl.HotTrackSelectMode Property

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

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(HotTrackSelectMode.SelectItemOnHotTrack)]
[DXCategory("Behavior")]
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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the HotTrackSelectMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also