Skip to main content
A newer version of this page is available. .

RepositoryItemTrackBar.ShowValueToolTip Property

Gets or sets whether the track bar shows the current value in a tooltip when a user moves a thumb.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v21.1.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Navigation

Declaration

[DefaultValue(false)]
[DXCategory("Behavior")]
public bool ShowValueToolTip { get; set; }

Property Value

Type Default Description
Boolean **false**

true if the track bar shows the current value in a tooltip when a user moves a thumb; otherwise, false.

Remarks

The default tooltip contains the current value. You can handle the RepositoryItemTrackBar.BeforeShowValueToolTip event to display a custom tooltip.

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);
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowValueToolTip 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