Board index » delphi » RichEdit with line by line fonts

RichEdit with line by line fonts

Anyone got or know where to get a Trichedit for D5 that allows font
setting Line by Line
Usual stuff Free & preferably with source.
I've never needed one before and I dont really have time to write one.

T.I.A.
Nick

email with NOSPAM removed
aon...@NOSPAMdsl.pipex.com

 

Re:RichEdit with line by line fonts


Quote
"Nick Gabb" <aon...@NOSPAMdsl.pipex.com> wrote in message

news:3E1DB48B.7805@NOSPAMdsl.pipex.com...

Quote
> Anyone got or know where to get a Trichedit for D5 that allows font
> setting Line by Line
> Usual stuff Free & preferably with source.
> I've never needed one before and I dont really have time to write one.

Since rtf documents can have font settings on each character and since the
concept of a "line" is rather nebulous (i.e. the same text can be displayed
in controls with different line widths or printed with different margins,
and a font change is likely going to alter the contents of the line). I
doubt if you are going to find component that meets your needs. You can,
however, very easily write the code to change fonts on each line of a
tRichEdit. Set the SelStart and SelLength properties to highlight the text
in a line then set the appropriate SelAttributes properties.

Re:RichEdit with line by line fonts


If you really need "line by line" activity and you don't need copy and paste
(or you can live with writing the code yourself for it), you can use the
TListBox control with owner drawn lines.  Just draw as you like with setting
the brush and the pen before calling ExtTextOut or some other textdrawing
function.

Kelly

Quote
"Nick Gabb" <aon...@NOSPAMdsl.pipex.com> wrote in message

news:3E1DB48B.7805@NOSPAMdsl.pipex.com...
Quote
> Anyone got or know where to get a Trichedit for D5 that allows font
> setting Line by Line
> Usual stuff Free & preferably with source.
> I've never needed one before and I dont really have time to write one.

> T.I.A.
> Nick

> email with NOSPAM removed
> aon...@NOSPAMdsl.pipex.com

Re:RichEdit with line by line fonts


Ta!. Just goes to show you never stop learning. I must have looked 20
times at how to change font but when I looked at selattributes because
it didnt directly mention font I didnt look any further.
Ho Hum.
Nick
Quote
Bruce Roberts wrote:

> "Nick Gabb" <aon...@NOSPAMdsl.pipex.com> wrote in message
> news:3E1DB48B.7805@NOSPAMdsl.pipex.com...
> > Anyone got or know where to get a Trichedit for D5 that allows font
> > setting Line by Line
> > Usual stuff Free & preferably with source.
> > I've never needed one before and I dont really have time to write one.

> Since rtf documents can have font settings on each character and since the
> concept of a "line" is rather nebulous (i.e. the same text can be displayed
> in controls with different line widths or printed with different margins,
> and a font change is likely going to alter the contents of the line). I
> doubt if you are going to find component that meets your needs. You can,
> however, very easily write the code to change fonts on each line of a
> tRichEdit. Set the SelStart and SelLength properties to highlight the text
> in a line then set the appropriate SelAttributes properties.

Other Threads