How to change the TrackBar Tick Color in Winforms?

旧时模样 提交于 2020-01-13 05:56:13

问题


I have a winforms app using a trackbar. The BackColor property is available for change, but doing so makes the color of each "tick" almost invisible. I don't see an explicit property to modify the color of the "tick". Is there something I am missing or a way to change the color of the tick?


回答1:


TrackBar is a wrapper around a native Windows control. Like most native controls, it draws itself using the system colors as selected by the user. You can't change it yourself. Beyond making your own control, there's nothing you can do but pick a contrasting background color. Which typically ought to be the same color as the container. Which typically is a system color as well ("Control").

A consistent look-and-feel between different applications was considered an asset. It arguably is, users like to pick a custom theme and expect programs to change accordingly.



来源:https://stackoverflow.com/questions/3752679/how-to-change-the-trackbar-tick-color-in-winforms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!