trichview.support
OnChange in Tables |
Author |
Message |
Marc |
Posted: 05/07/2005 0:00:49 Hi, I have a RVE and it has an 'OnChange' event assigned that works fine, except when making changes to tables. Could you have a look at the code below and tell me what I have done wrong? For the line 'table.InsertRowsAbove(1)' I would expect my rve.OnChange to fire, but it doesn't. procedure TfmDiary.TableOperation(id:Integer); var item: TCustomRVItemInfo; table: TRVTableItemInfo; Data: Integer; rve1: TCustomRichViewEdit; ItemNo: Integer; begin try if not Rve.CanChange or not Rve.GetCurrentItemEx(TRVTableItemInfo, rve1, item) then exit; table := TRVTableItemInfo(item); ItemNo := rve1.GetItemNo(table); case id of 1: {insert row above} begin if table.GetEditedCell(r,c)<>nil then nilcell:=false else nilcell:=true; table.InsertRowsAbove(1); if not nilcell then table.EditCell(r,c); end; end; {case} except end; end; |
Powered by ABC Amber Outlook Express Converter