Hello Sergey!
Is it possible to get pixel coordinates of the top-leftmost and bottom-rightmost corners of a table cell (in pixels)? GetItemCoords doesn't do the job for me..
[H]Get table cell pixel coordinates
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Thanks for reply!
I've tried these too, and it didn't work for me... Here is the RTF file I was working with: http://webfile.ru/1116045
I've solved the problem by using OnDrawBorder event, it works perfectly.
I've tried these too, and it didn't work for me... Here is the RTF file I was working with: http://webfile.ru/1116045
I've solved the problem by using OnDrawBorder event, it works perfectly.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I understand this, so I draw document at (0,0) on an offscreen canvas right after Init/FormatNextPage to get table cell coordinates.OnDrawBorder's coordinates are not always client coordinates, if document is repainted partially.
The methods you have suggested won't work for some reason.. Even GetCellAt doesn't work I guess it is because of the complex structure of the tables in the file (have a look at it).
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
This document is really looks complicated. But TRichView converts all RTF tables to HTML-like tables (m x n, the same number of columns in each row, some cells may be merged). So the structure of complex and simple tables are the same.
GetCellAt requires coordinates relative to the top left corner of the table. If this method does not work correctly, mouse selection would not work too, because this method is used to find cell below the mouse pointer.
GetCellAt requires coordinates relative to the top left corner of the table. If this method does not work correctly, mouse selection would not work too, because this method is used to find cell below the mouse pointer.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: