trichview.support
Re: Nested tables |
Author |
Message |
Albert Peracaula |
Posted: 12/02/2004 22:57:18 Thanks Sergey, I was actually looking for cell coordinates (row and column). I finally have found a way combining GetSourceRVData and GetAbsoluteParentData. procedure TForm1.Button1Click(Sender: TObject); var item: TCustomRVItemInfo; rve2: TCustomRichViewEdit; rvd : TCustomRVData; table: TRVTableItemInfo; r, c : integer; s : string; begin if rve.GetCurrentItemEx(TRVTableItemInfo, rve2, item) then begin table := TRVTableItemInfo(item); rvd := table.GetEditedCell(r, c).RVData; s := 'Caret position :'; while rvd.GetSourceRVData is TRVTableCellData do begin table := TRVTableCellData(rvd.GetSourceRVData).GetTable; table.GetEditedCell(r, c); s := s+#13#10+'R:'+IntToStr(r)+' / C:'+IntToStr(c); rvd := rvd.GetAbsoluteParentData; end; end else s := 'Caret not in table'; ShowMessage(s); end; "Sergey Tkachenko" <svt@trichview.com> wrote: >RichViewEdit1.InplaceEditor.Left and .Top - coordinates of the first cell >(client coordinates in RichViewEdit1) >RichViewEdit1.InplaceEditor.InplaceEditor.Left and .Top - coordinates of the >second cell (client coordinates in RichViewEdit1.InplaceEditor) > >table1 := TRVTableInplaceEdit(RichViewEdit1.InplaceEditor).FCell.GetTable - >the first table >table2 := >TRVTableInplaceEdit(RichViewEdit1.InplaceEditor.InplaceEditor).FCell.GetTabl >e - the second table. > >Coordinates of the first table in the document: >RichViewEdit1.GetItemCoords(table1.GetMyItemNo, Left, Top); >Coordinates of the second table in the first cell: >RichViewEdit1.InplaceEditor.GetItemCoords(table2.GetMyItemNo, Left, Top); > >See also GetItemClientCoords. > > > >> >> How can I get the parent table and parent cell coordinates of a nested >table >> ? >> >> I have 2 or more nested tables and I would need to know the sequence of >cell >> coordinates where the caret is from the inner table to the most outer one. >> >> Thanks > > |
Powered by ABC Amber Outlook Express Converter