TrackBar range disable

2 posts, 0 answers
  1. Laszlo
    Laszlo avatar
    3 posts
    Member since:
    Jan 2015

    Posted 02 Apr 2015 Link to this post

    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
  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 06 Apr 2015 Link to this post

    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.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top