Track bar negative min to positive max

2 posts, 0 answers
  1. Hugues
    Hugues avatar
    54 posts
    Member since:
    Sep 2014

    Posted 20 Jan 2015 Link to this post

    Is it possible to set the trackbar to an negative value for its min and a positive value for his max. What i want to do is have the thumb of the trackbar be position at the center when i slide it left it becomes negative and when i slide it right it become positive.
  2. Ralitsa
    Admin
    Ralitsa avatar
    176 posts

    Posted 21 Jan 2015 Link to this post

    Hi Hugues,

    Thank you for contacting us. 

    Yes, you can set the Minimum property to negative number. Here is the code snippet: 
    this.radTrackBar1.Minimum = -20;
    this.radTrackBar1.Maximum = 20;
    this.radTrackBar1.Value = 0;

    Please refer to the attached sample demo and image which demonstrates you the code and the result.
     
    Should you have further questions, I would be glad to help. 

    Regards,
    Ralitsa
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

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