color/bold specific text in text box

Started by dacarle, December 10, 2006, 11:25:44 PM

Previous topic - Next topic

dacarle

anyone know how to color and bold specific words in text box.  similar concept to code editor where the coloring and bolding is done automatically and not controlled by the user.

Thoughts and help appreciated.

-David

dacarle

even just coloring the text for certain keywords would be great (bold not necessary).

-David

TechSupport

I expect that you will not be able to easily do this with a standard TextBox control. You would have to subclass the control and do all of the drawing yourself. Better off using a dedicated control such as EDM32 for that task. Another solution would be to use a RichEdit control. Do a search in POFSS or the PB Forums for the EM_SETCHARFORMAT message. There are several examples that deal with changing fonts/colors of specific portions of a RichEdit control.

dacarle

Both EDM and RichEdit will do the trick nicely.  However the Borje EDM example does everything I need and then some.  Are there any examples of, or has anyone successful integrated EDM into a firefly form that would be willing to share?  



-David