Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
UltraTrackBar Background Color of Track
posted

How do I set the track color of the UltraTrackBar to the left of the 'Thumb'?

I'd like the area I've circled to be blue, and the area to the right to remain light gray...

I want it to have the same style as:


  • 469350
    Verified Answer
    Offline posted

    There's no built-in style that will draw like this, and there's no Appearance for the left or right of the thumb. 

    You could probably achieve something like this with a DrawFilter. But drawing those rounded ends and also filling them in would be very tricky, I think. 

    If you don't care about the rounded ends and just want to do this with a Rectangle, it would be a lot easier. I whipped up a little sample of that, using a Rectangle.

    If you want to delve into drawing the rounded edges, you would need to get into some trigonometry that's a bit beyond me. You would have to find all the points on the curve and usee DrawyPolygon and you would have to draw both sides of the track, not just the left.

     UltraTrackBar Left of Thumb Drawing.zip