Link to home
Start Free TrialLog in
Avatar of jexd99
jexd99

asked on

Edit box/individual chars


Is there a way to bold and color an individual character in an edit box?  (Using D5, in other words, if an edit box says "this is a test", I want to make "a" bold and green, an change it on the fly)

Thanks
Avatar of aikimark
aikimark
Flag of United States of America image

No.

That formatting would require a different control, such as RTF or web browser.

You could display the text formatted by printing on a canvas.  This would not be an editable control.
You can use TRichEdit setting
  RichEdit1.WordWrap := False;
  RichEdit1.WantReturns := False;
set also its height to such as edit

mokule
ASKER CERTIFIED SOLUTION
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think this could be done by using some winapi functions, but this is not the easiest way.
Avatar of jexd99
jexd99

ASKER

Thanks everyone, bummer I can't do this with an editbox but I'll make it work with richedit.
[quote]I can't do this with an editbox[/quote]
Correct as was stated by aikimark. The standard Windows
Edit control does not support colors, UNLESS, you do all
the drawing yourself and that would take a lot more
code than is shown.