且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

带有自定义刻度线文本的轨迹栏或滑块

更新时间:2023-12-06 14:26:46

我最终只是将标签控件放在需要文本的位置.我认为您不能在控件本身中标记刻度线,而不能用您自己的控件覆盖它们.

除此之外,您想要的标签并不意味着同一件事.轨迹栏控件上的刻度线是均匀分布的,并且表示同一事物中的一个或多个.您正在尝试混合使用小时,天,周和月以及恕我直言,这会给用户带来混乱的界面.
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.