Matt
Matt

Reputation: 2098

How to change the TrackBar Tick Color in Winforms?

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?

Upvotes: 2

Views: 4992

Answers (1)

Hans Passant
Hans Passant

Reputation: 941970

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.

Upvotes: 5

Related Questions