trichview.com

trichview.support




Show Line/Parabreak


Return to index


Author

Message

Dirk Bozza

Posted: 06/19/2003 22:25:16


Hi Sergey,


to show paragraph and linebreaks you give me the code below. But if the last

item in the line is a Control, the para/line break is not visible what can I

do?


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;





Powered by ABC Amber Outlook Express Converter