Page 1 of 1

Move caret to end text cell

Posted: Sat May 05, 2018 5:54 pm
by mohonko
Hello! How to move a caret to the end of text in a table cell?

Re: Move caret to end text cell

Posted: Sat May 05, 2018 7:59 pm
by Sergey Tkachenko
Moving to the end of table.Cells[r,c]:

Code: Select all

uses RVTable, CRVFData;

var
  RVData: TCustomRVFFormattedData;
  ItemNo, Offs: Integer;

RVData := table.Cells[r,c].Edit as TCustomRVFFormattedData;
ItemNo := RVData.ItemCount - 1;
Offs := RVData.GetOffsAfterItem(ItemNo);
RVData.SetSelectionBounds(ItemNo, Offs, ItemNo, Offs);

Re: Move caret to end text cell

Posted: Sat May 05, 2018 8:21 pm
by mohonko
I am used CRVFData and RVTable, but is my compiler show message "Undeclared identifier". What is it? In uses main unit i'am wrtite it is modules. The procedure that moves the caret is also in the main module. My version RichViewEdit 16.5.

Re: Move caret to end text cell

Posted: Sat May 05, 2018 8:29 pm
by mohonko
You have a typing error, as it turned out. It is necessary to write not "TCustomRVFFormattedData" and "TCustomRVFormattedData". Thank you, you helped me a lot.