Table Inside a Table

General TRichView support forum. Please post your questions here
Post Reply
Joel Cuyos

Table Inside a Table

Post by Joel Cuyos »

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
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If the caret is inside table cell, ChartEditor.TopLevelEditor is an inplace editor of this cell.

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;
Joel Cuyos

Post by Joel Cuyos »

Thanks Sergey
Post Reply