Re: [gtkmm] Receiving mouse button click info in Gtk::Treeview



On Wednesday, January 8, 2003, at 08:24 AM, Liza Klerck wrote:

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.

You can do this by first adding the events to the widget, and then hooking into signal_event(). When you get a button or motion event, pass the mouse coords into Gtk::TreeView::get_path_at_pos(). This will give you the path to the row, the column, and the cell_x/cell_y position.

--- darco
http://www.deepdarc.com/

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