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
You can use TRichEdit setting
RichEdit1.WordWrap := False;
RichEdit1.WantReturns := False;
set also its height to such as edit
mokule
RichEdit1.WordWrap := False;
RichEdit1.WantReturns := False;
set also its height to such as edit
mokule
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think this could be done by using some winapi functions, but this is not the easiest way.
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.
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.
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.