trichview.support
Re: Drag and Drop file into the table... |
Author |
Message |
Sergey Tkachenko |
Posted: 12/09/2002 16:20:17 procedure TFrameOrderText.RVDragDrop(Sender, Source: TObject; X,Y: Integer); var Row,Col : Integer; ItemName : string; item: TCustomRVItemInfo; table : TRVTableItemInfo; currve: TCustomRichViewEdit; begin MoveCaretTo(X,Y); // rv - editor generating this event // currve will contain editor owning returned table if rv.GetCurrentItemEx(TRVTableItemInfo, currve, item) then begin table := TRVTableItemInfo(item); if table.GetEditedCell(Row,Col) then begin .... end; end; end; There is only one problem - if tables are nested and caret is in the cell of the the most nested table (table inside table)., GetCurrentItemEx returns this the most nested table. I do not know if this is what you need. > could you send me an example? > > Sergey Tkachenko wrote: > > > I believe that this function works, but it seems overcomplicated. > > You can simply use GetCurrentItemAt. > > > > > > > > Dear Sergey, > > > here is my solution to the problem. With my little function > > "IsCursorInsideTable" > > > I can get the table, the tablename and the row and column, no matter what > > > is inside > > > the cell of the table. > > > Best wishes > > > ckc > > > > |
Powered by ABC Amber Outlook Express Converter