01-09-2015 02:57 AM - edited 01-09-2015 02:58 AM
Hello!
Does anyone know a solution to get the coordinates of a ctrl subitem (especially list/tree item) on a panel (not the control coordinates itself!)?
It's just possible to get the index from a specified point (GetIndexFromPoint) but i want that vice versa...
Thanks!
01-09-2015 03:35 AM
...analogous to this idea there are table functions like GetTableCellFromXXXX, but i want to use tree control type with indizes...
01-09-2015 07:18 AM - edited 01-09-2015 07:19 AM
This is not the exact answer to your question but can give of help. I remember to have used a canvas on top of a table drawing a rectangle synced with table rows; the rectangle was draw with:
CanvasDrawRoundedRect (panelHandle, PANEL_TABLE, MakeRect (row1 * 19 - 2, 2, row2 * 19 + 6, 6), 6, 3, VAL_DRAW_FRAME_AND_INTERIOR);
The task was simplified by these facts:
If you want Getting the coordinates relative to control can be obtained considering the column labels height and row labels width (GetCtrlAttribute with attribute ATTR_COLUMN_LABELS_HEIGHT and ATTR_ROW_LABELS_WIDTH respectively) plus the control frame width (ATTR_FRAME_THICKNESS).