trichview.com

trichview.support




Re: How can I move carret position?


Return to index


Author

Message

Yernar

Posted: 02/04/2003 12:40:04


To move a caret to the beginning of document in TRichViewEdit:


var

  ItemNo, Offs: Integer;


ItemNo := 0;

Offs   := MyRichViewEdit.GetOffsBeforeItem(ItemNo);

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



To move a caret to the end of document in TRichViewEdit:


var

  ItemNo, Offs: Integer;


ItemNo := MyRichViewEdit.ItemCount-1;

Offs   := MyRichViewEdit.GetOffsAfterItem(ItemNo);

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





Powered by ABC Amber Outlook Express Converter