Re: [gtkmm] TreeView widget - Double-Click
- From: Daniel Bausch <DanielBausch gmx de>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] TreeView widget - Double-Click
- Date: Thu, 19 Dec 2002 23:38:50 +0000
Hello,
Am Thursday, 19. December 2002 13:02 schrieb Sebastian Stark:
> OK,
> I have written a little "HelloWorld" program with
> signal_button_press_event().
That event is your problem itself. This is a native X-Event, that is wrapped
by Gtk+/gtkmm. If you want this event to be activated you must call
Gtk::Widget::add_events(Gdk::BUTTON_PRESS_MASK);
Here is the modified source part:
HelloWorld::HelloWorld() :
m_button("Hello World")
{
add(m_button);
m_button.show();
m_button.add_events(Gdk::BUTTON_PRESS_MASK);
m_button.signal_button_press_event().connect(
SigC::slot(*this, &HelloWorld::on_button_press));
}
-- Daniel Bausch
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]