Board index » delphi » multiple fonts on single line in TRichEdit

multiple fonts on single line in TRichEdit

Is it possible to use multiple fonts on the same line in a TRichEdit.  I
wish to insert multiple strings on the same line in a TRichEdit but each
string in a different font.
Thank you,  
Andrew Seitz  (sei...@docker.com)

 

Re:multiple fonts on single line in TRichEdit


Quote
Andrew Seitz wrote:

> Is it possible to use multiple fonts on the same line in a TRichEdit.  I
> wish to insert multiple strings on the same line in a TRichEdit but each
> string in a different font.
> Thank you,
> Andrew Seitz  (sei...@docker.com)

  RichEdit1.SelAttributes.Size := SomeFontSize;
  RichEdit1.SelAttributes.Name := SomeFontName;
  Add the text here...

Joe

--
Joe C. Hecht
Borland Delphi Developer Support Group
Technical Documents and Online Forums are available at
http://www.borland.com

Re:multiple fonts on single line in TRichEdit


Quote
Andrew Seitz wrote:

> Is it possible to use multiple fonts on the same line in a TRichEdit.  I
> wish to insert multiple strings on the same line in a TRichEdit but each
> string in a different font.

        It seems like there should be a nicer way, but I've seen big
fancy experts recommend using SelAttributes for this. (Save the old
SelStart and SelLength, select the text you want to modify, modify it
via SelAttributes, then maybe put the selection back to what it was,
if that makes sense.)
--
David Ullrich

?his ?s ?avid ?llrich's ?ig ?ile
(Someone undeleted it for me...)

Other Threads