LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

get point from index



 

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!

0 Kudos
Message 1 of 3
(4,214 Views)

...analogous to this idea there are table functions like GetTableCellFromXXXX, but i want to use tree control type with indizes...

0 Kudos
Message 2 of 3
(4,201 Views)

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:

  • I had manually aligned the canvas with the exact table rows-area
  • The table had uniform rows with explicit height of 19 pixels

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).

 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 3
(4,189 Views)