Re: TreeView Row recieve click signal


what you're looking for are the two signals Gtk::TreeView::signal_row_activated() for the double click on a row and Gtk::TreeSelection::signal_changed() for when an row is selected. You can get the selection with Gtk::TreeView::get_selection(). Hope this helps...


On 06/22/2010 01:06 AM, Damianos Mylonakis wrote:

I am trying to recieve a signal when there is a click event on a specific row of a TreeView with a ListStore model. Here is a screenshot of the application to make it more clear

In a few words, what i want is when double click is done on a row, to connect to this signal
and move to this directory ( its supposed to be a file manager )

I tried to find such a signal on the Gtk::TreeViewColumn documentation, but nothing there. I further read that each row is not able to recieve X events, thus cant handle click event, but TreeView can. I can capture on_button_press_event from TreeView, but then i wouldnt know which specific row was clicked, Maybe i could find out
from x,y coords but i think that is too hard.

Another idea is to have the ListStore contain EventBox'es with Labels inside, instead of just Labels, so i can recieve the events from the EventBox,
but i cant find how to override the widget contained in the row.

Any suggestion?
Thank you.

gtkmm-list mailing list
gtkmm-list gnome org

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