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

Track bar negative min to positive max

1 Answer 423 Views
TrackBar
This is a migrated thread and some comments may be shown as answers.
Hugues
Top achievements
Rank 1
Hugues asked on 20 Jan 2015, 06:27 PM
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.

1 Answer, 1 is accepted

Sort by
0
Ralitsa
Telerik team
answered on 21 Jan 2015, 02:03 PM
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.

 
Tags
TrackBar
Asked by
Hugues
Top achievements
Rank 1
Answers by
Ralitsa
Telerik team
Share this question
or