Table and Cells

General TRichView support forum. Please post your questions here
Post Reply
Jmich
Posts: 19
Joined: Mon Apr 30, 2007 10:10 am

Table and Cells

Post by Jmich »

If I rve.SearchText in Table by a certain text was found and selected.

I would also like the cell (row and column) in a label.caption read.

For example, during a similar Stringgrid.
Label1.Caption: = 'Row:'+ IntToStr (Stringgrid.row);
Label2.Caption: = 'Col:' + IntToStr (Stringgrid.Col);

My question:

Is that when Richview.table .... possible?
If yes - then how!
Please if possible, a sample code

Best Regards

Jmich
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Do you want to know the position of edited cell?

Code: Select all

var rve: TCustomRichViewEdit;
  table: TRVTableItemInfo;
  Row, Col: Integer;

if not RichViewEdit1.GetCurrentItemEx(TRVTableItemInfo, rve, TCustomRVItemInfo(table)) then
  exit; // not in table;
if table.GetEditedCell(Row,Col)=nil then
  exit; // table does not have edited cell
Label1.Caption: = 'Row:'+ IntToStr (Row); 
Label2.Caption: = 'Col:' + IntToStr (Col);
Jmich
Posts: 19
Joined: Mon Apr 30, 2007 10:10 am

Table and Cells

Post by Jmich »

Hi Sergey,

Thank you for quick help.
It works great!

Please excuse my bad English

Best Regards
Post Reply