How to delete a TRVTableItemInfo from TRichView?
Posted: Tue Aug 21, 2018 2:56 pm
TRichView can not DeleteSelection?
procedure DeleteTable(rve: TCustomRichViewEdit; table: TRVtableitemInfo);
var
RVData: TCustomRVData;
ItemNo: Integer;
begin
RVData := table.Cells[0, 0].GetAbsoluteParentData;
ItemNo := table.GetMyItemNo;
// Table is the ItemNo-th item in RVData.
RVData := RVData.Edit;
TCustomRVFormattedData(RVData).SetSelectionBounds(ItemNo, 0, ItemNo, 1);
rve.DeleteSelection;
end;
procedure DeleteTable(rve: TCustomRichViewEdit; table: TRVtableitemInfo);
var
RVData: TCustomRVData;
ItemNo: Integer;
begin
RVData := table.Cells[0, 0].GetAbsoluteParentData;
ItemNo := table.GetMyItemNo;
// Table is the ItemNo-th item in RVData.
RVData := RVData.Edit;
TCustomRVFormattedData(RVData).SetSelectionBounds(ItemNo, 0, ItemNo, 1);
rve.DeleteSelection;
end;