Split Text Color

  • 16 years ago

    Hi,
    I was wondering how I could, using the .NET framework/method, to make it so I can draw a string with 2 or more colors, where one color turns to the other at an X value that will be based on my code.  


    Im not looking for a gradient between 2 colors, but a sharp and sudden change at a point i specify.  Like on some scroll bars that show the current bar's fill percent (text), how the text over the bar is a different color then the text not over it.  


    I think I would have to use some sort of PathGradientBrush to do this but I'm not sure...

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson