trichview.com

trichview.support.examples




Re: How to move the caret to the end?


Return to index


Author

Message

jonjon

Posted: 03/24/2005 13:32:45


> How to move the caret to the end in terichviewedit?


From the help file:


------------------


Caret is always at the end of selection.

Selection can be changed using method TRichViewEdit.SetSelectionBounds.


Moving to the beginning:


var

  ItemNo, Offs: Integer;

...

ItemNo := 0;

Offs   := MyRichViewEdit.GetOffsBeforeItem(ItemNo);

MyRichViewEdit.SetSelectionBounds(ItemNo,Offs,ItemNo,Offs);


Moving to the end:


var

  ItemNo, Offs: Integer;

...

ItemNo := MyRichViewEdit.ItemCount-1;

Offs   := MyRichViewEdit.GetOffsAfterItem(ItemNo);

MyRichViewEdit.SetSelectionBounds(ItemNo,Offs,ItemNo,Offs);


------------------


Regards, John.





Powered by ABC Amber Outlook Express Converter