Re: row_activated and modifiers keys
- From: José Alburquerque <jaalburquerque cox net>
- To: Tiberius DULUMAN <tiberius duluman gmail com>
- Cc: gtk-app-devel-list gnome org, gtkmm-list gnome org
- Subject: Re: row_activated and modifiers keys
- Date: Fri, 11 Jan 2008 13:06:31 -0500
Tiberius DULUMAN wrote:
On the handler of the row_activated signal of the TreeView,
I need to implement different behaviour if CTRL or SHIFT key
is pressed. ( ie. when double-clicking a row something is
happening, and when double-clicking it and SHIFT key is pressed
something else should happen ).
Does anyone have any idea how can I implement this, please?
Thanks
Either you re-implement the TreeView::on_button_press_event() method of
the TreeView (inherited from Gtk::Widget) or you should connect a slot
(callback) to the TreeView::signal_button_press_event() (also from
Gtk::Widget) (see API docs). Both the on_button_press_event() method
and the slot receive a GdkEventButton* which allows you to check for
SHIFT, CTRL, etc (see
http://library.gnome.org/devel/gdk/stable/gdk-Event-Structures.html#GdkEventButton).
-Jose
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]