trichview.com

trichview.support




Re: Show Line/Paragraph break


Return to index


Author

Message

Dirk Bozza

Posted: 01/20/2003 17:09:08


Thank You, it works fine!


"Sergey Tkachenko" <svt@trichview.com> wrote:

>Using TRVStyle.OnDrawStyleText.

>Something like this:

>

>procedure TForm3.RVStyle1DrawStyleText(Sender: TRVStyle; const s: String;

>  Canvas: TCanvas; StyleNo, SpaceBefore, Left, Top, Width, Height: Integer;

>  DrawState: TRVTextDrawStates; var DoDefault: Boolean);

>var FontName: String;

>    Charset: TFontCharset;

>    Color, BackColor: TColor;

>    BrushStyle: TBrushStyle;

>begin

>  if (rvtsItemEnd in DrawState) and

>(TCustomRVData(Sender.RVData).ItemCount>Sender.ItemNo+1) then begin

>    Color     := Canvas.Font.Color;

>    BackColor := Canvas.Brush.Color;

>    BrushStyle := Canvas.Brush.Style;

>    Canvas.Font.Color := clWindowText;

>    Canvas.Brush.Style := bsClear;

>    if TCustomRVData(Sender.RVData).IsFromNewLine(Sender.ItemNo+1) then

>      if TCustomRVData(Sender.RVData).IsParaStart(Sender.ItemNo+1) then

>        Canvas.TextOut(Left+Width, Top, #$B6)

>      else begin

>        FontName := Canvas.Font.Name;

>        Charset  := Canvas.Font.Charset;

>        Canvas.Font.Name := 'Symbol';

>        Canvas.Font.Charset := SYMBOL_CHARSET;

>        Canvas.TextOut(Left+Width, Top, #$BF);

>        Canvas.Font.Name := FontName;

>        Canvas.Font.Charset := Charset;

>      end;

>    Canvas.Font.Color := Color;

>    Canvas.Brush.Color := BackColor;

>    Canvas.Brush.Style := BrushStyle;

>  end;

>end;

>

>

>>

>> Hello!

>>

>> How can I show line/paragraph break (\r, \r\n) on screen like Word???

>>

>> Thanks

>>   Dirk

>

>





Powered by ABC Amber Outlook Express Converter