Hiding Popup Menus based on right clicks



Hi All,

In my application I am using a Treeview. I also display a Popup Menu, whenever, the user
selects a given row and right clicks.

However, the Popup menu also appears, whenever, the user selects a row, but right clicks
on any other row[ie apart from the selected row] as well. At these points, I need to hide
the Popup Menu.

To do this, I need to differentiate between the selected row and the right click on any other row
in the treeview, and based on this, decide whether to display the Popup Menu or not. How do I get this information?

I am not sure, if I need to use this API: $treeview->get_path_at_pos($event->x, $event->y). This
 gives me the x and y coordinates of the right clicked row. How do I use this info and compare it
to the selected row?

Any help will be greatly appreciated.

Thanks
Ashwin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]