Reputation: 3523
I'm using .NET trackbar to play data I've recorded on a device.
It works great and I use it as a time line in a video player. as you can see in this image:
Now, when playing the data recorded from the device, some times the data contains ERRORS and WARNING values. I want to add markers/labels when special values occurs.
like in this image (Forgive me for my ugly drawing):
In the above image I want to mark on the trackbar in yellow markers when a Warning occur and in red when Error occur.
how can I Implement this? is there an opensource solution to this? - I know there are other track bars like: http://www.codeproject.com/KB/miscctrl/MAC_Slider.aspx
http://www.codeproject.com/KB/miscctrl/gTrackBar.aspx
but I \ dont think they solve my issue... plus I want to work with the .Net native trackbar. maybe to draw on it??
an Example on how to draw on the trackbar properly (without strange flickering...) could really help me. Thanks
Upvotes: 0
Views: 610
Reputation: 1155
What you can go about doing is making a owner-drawn trackbar
. This requires going in and overriding some of the appearance event handlers for the trackbar
.
The trackbar
is not a fun control to be modifying. Honestly what I would do, is just go ahead and put a "l" inside a label
and change the color accordingly. It will save you a lot of time and frustration.
Here is an example of user drawn trackbar
though.
Upvotes: 2