In a GTK/GTK# TreeView, how do I get the item/node which the mouse pointer is currently hovering over?
In a GTK/GTK# TreeView , how do I get the item/node which the mouse
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Let’s say we want to select items using the right mouse button without using checkboxes. The following ButtonPress event handler does just that – it toggles the selected property of the item we have clicked with the RMB. We then use CellDataFuncs to highlight the selected items. tv is the TreeView, store is the underlying ListStore.
If we are using a sorted TreeView, we have to use the TreeModelSort object instead of the ListStore object to get the correct item: