[gtkmm] Receiving mouse button click info in Gtk::Treeview
- From: Liza Klerck <liza trdlnk com>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Receiving mouse button click info in Gtk::Treeview
- Date: Wed, 8 Jan 2003 10:24:37 -0600 (CST)
Hi,
I would like to be able to receive mouse button click events in a Gtk::Treeview.
When the user clicks in the TreeView I need to be able to determine which column
and row the click occured in as well as which mouse button was pressed.
I tried connecting to Gtk::TreeView.signal_button_press_event() but the
callback is never called, I also tried adding events with
Gtk::TreeView.add_events(Gdk::BUTTON_PRESS_MASK) which still does not cause the
callback to be called.
If I can get the callback to work I can determine the row by looking at the
Gtk::TreeSelection but I do not know how to determine the column in which the
click occured.
Another option would be to subscribe to the Gtk::TreeSelection::on_changed()
event which would probably give me the row but not the column or the type of
mouse button click (Left, right etc)
Thanks !
Liza Klerck
Gtk::TreeView m_TreeView;
.
.
m_TreeView.show();
m_TreeView.add_events(Gdk::BUTTON_PRESS_MASK);
m_TreeView.signal_button_press_event().connect( SigC::slot(*this,
&ExampleWindow::on_m_TreeView_button_press) );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]