Re: [glade--]TreeView and button_press_event

Fabrice Colin wrote:
> Christof Petig wrote:
>> Besides that I never heard of connect_notify() - can you explain the
>> difference?
> The only thing I know about it is from the explanation given by Murray
> Cummings in the bug report I mentioned.
> With connect(), it is first passed to the treeview/renderer (where,
> unfortunately, "the standard handler stops the further handling of the
> signal", ie it is not delivered in turn to the user's handler),
> whereas with connect_notify(), the event is passed to the users's
> handler first and then to tthe treeview.
> Using connect_notify() ensures the application gets the
> button_press_event message.

I found another page that mentions connect_notify(), this time a tutorial :

The interesting snippet is :
class TreeView_WithPopup : public Gtk::TreeView
  virtual ~TreeView_WithPopup();

  // Override Signal handler:
  // Alternatively, use signal_button_press_event().connect_notify()
  virtual bool on_button_press_event(GdkEventButton *ev);


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