Click here to Skip to main content
15,887,776 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
Hi there -

I'm working on a WinForms app and would like to have a Trackbar/Slider control where the tickmarks have text next to them. The text would be more intuitive to the end user than just a mark or some numeric value. For instance, at maps.bing.com, they've got a slider control there that has street/city/country.

The number of ticks and the text is something that is data-dependent. Might be something like this:

<br />
- 1 Hour<br />
- 2 Hours<br />
- 6 Hours<br />
- 12 Hours<br />
- 1 Day<br />
- 1 Week<br />
- 1 Month<br />


I haven't seen anyone doing anything like this, but I could have missed it.

Ideas?

Thanks,
Matt
Posted

1 solution

I ended up just putting label controls where I wanted text. I don't think you can label the tick marks in the control itself without overriding it with your own control.

Beyond that, the labels you want don't mean the same thing. The tick marks on a track bar control are evenly spaced and would indicate one or more of the same thing. You're trying to mix hours, days, weeks and months, and IMHO, that would present a confusing interface to the user.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900