This is a migrated thread and some comments may be shown as answers.

TrackBar range disable

1 Answer 68 Views
TrackBar
This is a migrated thread and some comments may be shown as answers.
Laszlo
Top achievements
Rank 1
Laszlo asked on 02 Apr 2015, 02:33 PM
Hi Telerik,

I have a simple question about the RadTrackBar control when I am using it in Range mode. Is it possible to disable the dragging the orange range line? I would like to limit the user to set the range value only on the two thumbs.

Thanks in advance,
Laszlo

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Apr 2015, 01:20 PM
Hello Laszlo,

Thank you for writing.

You can stop the ranges changing when dragging the RangeElement by disabling the mouse input for these elements:
private void Form1_Load(object sender, EventArgs e)
{
    foreach (TrackBarIndicatorElement indicator in this.radTrackBar1.TrackBarElement.BodyElement.IndicatorContainerElement.Children)
    {
        indicator.RangeElement.ShouldHandleMouseInput = false;
        indicator.RangeElement.ShouldHandleMouseInput = false;
    }
}

I hope this information helps. Should you have further questions, I would be glad to help.
 
Regards,
Dess
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
TrackBar
Asked by
Laszlo
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or