trichview.com

trichview.support




Re: Editor in Delphi program.


Return to index


Author

Message

Sergey Tkachenko

Posted: 05/17/2002 18:56:56


Vertical line at the right side, like in Delphi IDE?


Ok, ok, I've added a new event - OnPaint.


This example will draw a vertical line at 300 pixels distance from the left

side of the scrollable area:


procedure TForm1.RichViewEdit1Paint(Sender: TCustomRichView;

  Canvas: TCanvas; Prepaint: Boolean);

begin

   if not Prepaint then begin

     Canvas.Pen.Color := clSilver;

     Canvas.Pen.Width := 1;

     Canvas.Pen.Style := psSolid;

     Canvas.MoveTo(300-Sender.HScrollPos, 0);

     Canvas.LineTo(300-Sender.HScrollPos, Sender.ClientHeight);

   end;

end;

(tip: if you set RichView.MaxTextWidth = some value>0, text will be wrapped

when length of line will reach this length)


Parameter "Prepaint" will be reserved for future use - this event will be

called after all standard painting is complete.

I'll try to upload update in area for registered users today.


> i want to show length line on right screen.

>

> Is this possible?

>

> if then, Can you inform?

>

>

> thanks......... Sergery Tkachenko.....

>

>

>







Powered by ABC Amber Outlook Express Converter