I use StatusBars a lot. One of the things I have added to my StatusBar usage is the ability to add a ProgressBar to one of the panels in the StatusBar and it works like a charm.

However, in my continuing struggle to improve my programs I wanted to add the ability to display either some text or the percentage complete in the middle of the Progress Bar so I added the facility.

Now comes my problem. How do I make the text on the ProgressBar change colour when the bar reaches it and only that part of the text in front of the bar to change to a contrasting colour? Is there a property or method of perhaps the Color object that will tell me the opposite, in terms of contrast, to a colour?

I'm stumped on this one. As always any help will be gratefully accepted with the usual kudos.

Kevin Bell