trichview.com

trichview.support




Re: SetSelectionBounds


Return to index


Author

Message

Sergey Tkachenko

Posted: 08/02/2002 10:35:00


This procedure moves caret at the beginning of the ParagraphIndex-th

paragraph.


procedure GoToParagraph(rve: TCustomRichViewEdit; ParagraphIndex:

Integer);

  var i: Integer;

  begin

    for i := 0 to rve.ItemCount-1 do begin

      if rve.IsParaStart(i) then

        dec(ParagraphIndex);

      if ParagraphIndex<0 then begin

        rve.SetSelectionBounds(i, rve.GetOffsBeforeItem(i), i,

rve.GetOffsBeforeItem(i));

        exit;

      end;

    end;

  end;


Call:

   GoToParagraph(RichViewEdit1, 60);

   RichViewEdit1.InsertPageBreak.


>

> Exactly.. I want to count a "60" paragraphs..what can I do.

>

> Thanks for All...and your time






Powered by ABC Amber Outlook Express Converter