The code below works fine if the table in question is located directly on the Editor. If the it is located in a table cell, that's a problem..
if ChartEditor.GetCurrentItemEx(TRVTableItemInfo, RVE, Item) then
begin
Table := TRVTableItemInfo(item);
ItemNo := Table.GetMyItemNo;
ChartEditor.TopLevelEditor.SetSelectionBounds(ItemNo, ChartEditor.TopLevelEditor.GetOffsBeforeItem(ItemNo), ItemNo, ChartEditor.TopLevelEditor.GetOffsBeforeItem(ItemNo)); <-- error on this line
end;
Any help is appreciated
Table Inside a Table
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
If the caret is inside table cell, ChartEditor.TopLevelEditor is an inplace editor of this cell.
The editor containing table is returned in RVE:
The editor containing table is returned in RVE:
Code: Select all
if ChartEditor.GetCurrentItemEx(TRVTableItemInfo, RVE, Item) then
begin
Table := TRVTableItemInfo(item);
ItemNo := Table.GetMyItemNo;
RVE.SetSelectionBounds(ItemNo, RVE.GetOffsBeforeItem(ItemNo),
ItemNo, RVE.GetOffsBeforeItem(ItemNo));
end;