PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: dacarle on December 10, 2006, 11:25:44 PM

Title: color/bold specific text in text box
Post by: dacarle on December 10, 2006, 11:25:44 PM
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
Title: color/bold specific text in text box
Post by: dacarle on December 11, 2006, 09:28:43 AM
even just coloring the text for certain keywords would be great (bold not necessary).

-David
Title: color/bold specific text in text box
Post by: TechSupport on December 11, 2006, 12:12:02 PM
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.
Title: color/bold specific text in text box
Post by: dacarle on December 11, 2006, 10:07:15 PM
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