Re: [gtkmm] right-click in declarated Gtk::TreeView
- From: Murray Cumming <murrayc murrayc com>
- To: "B.Hakvoort" <bart hakvoort be>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] right-click in declarated Gtk::TreeView
- Date: Mon, 07 Jun 2004 16:49:07 +0200
On Mon, 2004-06-07 at 16:38 +0200, B.Hakvoort wrote:
> Hey,
>
> Normally i built my treeview by just deriving from Gtk::TreeView and by
> overriding some callbacks to add my custom code to some signals. Before
> implementing my own code i call the base class to allow normal handling
> of the signal. (this is all explained in the book)
> This time, however, i've just declared a Gtk::TreeView and catch
> right-clicks by connecting to "signal_button_press_event" using the
> following code:
> -------------------------------------------------
> treeview.signal_button_press_event().connect_notify(
> sigc::mem_fun(*this, &DetailWindow::treeview_click) );
> ----------------------------------------------------
>
> works ok, but it seems "normal handling" doesn't happen anymore. The row
> get's selected after i've executed my custom code (popup menu).
> So, how do i call the normal signal handler for onclick events? Since
> i'm not deriving from Gtk::TreeView i don't have access to the protected
> memberfunctions.
>
> I hope i did make myself clear, if not, just ask :^)
You might experiment with connect(slot , true /* before */), which needs
a return value for the slot.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]