Multi-colored string

detempel used Ask the Experts™
How can I show a multi-colored string in which each letter can have a different color?

With the edit-box I can only choose one color. Using the function 'ColorToString' results in a hexadecimal code in the edit-box.

I want to use this to be able to design multi-colored strings. I use the 'ColorDialog' to pick colors.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Use TRichEdit insted of TEdit.

If you want I can give a sample about it.


The TRichEdit is the solution. You can select any piece of text in it and then assign the colour you like to it.

I use it for a simple text editor I've made where I need to quickly set Red, Green or Blue. Made buttons for each colour that sets the selection to the chosen colour - works great.
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial