Board index » cppbuilder » Changing font in a RichEdit

Changing font in a RichEdit

How i can do that at runtime?
I tried with

RichEdit1->Font = FontDialog1->Font

and

RichEdit1->Font->Assign(FontDialog1->Font)

but inside the richedit nothing change, and also when i add new lines, the
font is always the same.

The code above works fine for the rest of controls (Edit, Panels, etc)  in
the form.

Anyone could help?

Thanks.

 

Re:Changing font in a RichEdit


Are you trying to change the font of the ENTIRE text, or just that of new
text inserted after the font change?

If the former, then you need to set the various values of the RichEdit's
DefAttributes property

If the latter, then the SelAttributes property instead (make sure SelLength
== 0 first)

Gambit

Quote
"BauD" <anon...@equestri.it> wrote in message news:3ae1bdf9_2@dnews...
> How i can do that at runtime?

Other Threads