View previous topic :: View next topic |
Author |
Message |
Hvid Guest
|
Posted: Fri Jun 30, 2006 8:35 am Post subject: Get Hovered item |
|
|
Hi.
I've attachead a System.Windows.Forms.ToolTip component to my TreeListView.
The size of this tooltip is defined by the object the hovered node is databinded against.
Therefore, I need some way of getting access to the node that is hovered excactly when the Popup method of my ToolTip is raised. Only this way can I correctly calculate the size of my ToolTip and display it in the correct size.
Is there any way of getting the currently hovered node in the TreeView? I'm guessing that you're already calling Show on the ToolTip when this happens.
Rgds.
Jesper |
|
Back to top |
|
|
Guest
|
Posted: Fri Jun 30, 2006 8:38 am Post subject: |
|
|
*Note
I'm using the 3.0.0.0 version of the VirtualTree. I have no idea why my brain wanted me to enter TreeListView instead. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sat Jul 01, 2006 12:36 am Post subject: |
|
|
Try calling VirtualTree.GetWidget(x, y) where x and y are the current mouse position. If you are over a cell this will return a CellWidget. From there you can get the Row the cell is assocatied with. Row.Item gives you the item the row is bound to or CellWidget.CellData.Value gives you the value the cell is bound to. _________________ Infralution Support |
|
Back to top |
|
|
Hvid Guest
|
Posted: Thu Jul 06, 2006 8:51 am Post subject: |
|
|
That did the trick
Thanks a lot for your help. |
|
Back to top |
|
|
|