trichview.com

trichview.support




Re: End of par mark


Return to index


Author

Message

Sergey Tkachenko

Posted: 05/15/2003 18:10:01


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;


Not tested with Right-to-Left text.

>

> Please, is it possible to show/hide some end of paragraph mark?

>      Jiri Binder





Powered by ABC Amber Outlook Express Converter