Goto first char

General TRichView support forum. Please post your questions here
Post Reply
Marcel

Goto first char

Post by Marcel »

How I can move the cursor to the first char of paragraph
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

To the very first char:

Code: Select all

rve.SetSelectionBounds(0, rve.GetOffsBeforeItem(0), 0, rve.GetOffsBeforeItem(0));
To the first char of the current paragraph:

Code: Select all

i := rve.CurItemNo;
while not rve.IsParaStart(i) do
  dec(i);
rve.SetSelectionBounds(i, rve.GetOffsBeforeItem(i), 0, rve.GetOffsBeforeItem(i));
To the beginning of the specified paragraph:
http://www.trichview.com/forums/viewtopic.php?t=7
Marcel

Post by Marcel »

Thank you very much
Post Reply