Inserting row into table if table not in focus

General TRichView support forum. Please post your questions here
Post Reply
Axel
Posts: 1
Joined: Tue Oct 23, 2007 9:31 am
Location: Russian Federation

Inserting row into table if table not in focus

Post by Axel »

How I can insert one or more rows into table, if cursor currently at another item? Cell not focused. ItemNo is known.
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The code is the same as for modifying table at the caret position:

Code: Select all

var Data: Integer;

rve.BeginItemModify(ItemNo, Data);
with rve.GetItem(ItemNo) as TRVTableItemInfo do
  InsertRows(RowCount, 1, RowCount-1);
rve.EndItemModify(ItemNo, Data);
rve.Change;
Post Reply