Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TrackBarControl.BeforeShowValueToolTip Event

Allows you to provide custom tooltips for the thumb(s).

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(true)]
[DXCategory("Events")]
[EditorBrowsable(EditorBrowsableState.Always)]
public event TrackBarValueToolTipEventHandler BeforeShowValueToolTip

#Event Data

The BeforeShowValueToolTip event's data class is DevExpress.XtraEditors.TrackBarValueToolTipEventArgs.

#Remarks

This event is equivalent to the RepositoryItemTrackBar.BeforeShowValueToolTip event. Please refer to this topic, to learn more.

#Example

The following code shows how to implement custom tooltips for a TrackBarControl’s thumb.

To enable tooltips, the RepositoryItemTrackBar.ShowValueToolTip property is set to true. Custom tooltips are implemented via the TrackBarControl.BeforeShowValueToolTip event. The result is shown below:

TrackBar_CustomTooltips

trackBarControl1.Properties.ShowValueToolTip = true;
//...

private void trackBarControl1_BeforeShowValueToolTip(
object sender, DevExpress.XtraEditors.TrackBarValueToolTipEventArgs e) {
    e.ShowArgs.ToolTip = string.Format("Value = {0}", trackBarControl1.Value);
}
See Also