Re: begginer with C++



On 2/24/06, Carlos Garces <carlos garces gmail com> wrote:
> I try with this:
>
>   mpGlade->get_widget("boxAbout", mpEventBox);
>   mpEventBox->set_events (GDK_BUTTON_PRESS_MASK);
>   mpEventBox->button_press_event.connect(slot(*this,  &MainWindow::onAbout));
>
> But my compiler said
> No matching function for call to `Gtk::EventBox::set_events(GdkEventMask)'
>
> Any help?
>
> Un saludo
> Carlos Garces

Welcome Carlos,

Try this:
mpEventBox->set_events(Gdk::BUTTON_PRESS_MASK);

gtkmm wrapps the GDK enums inside the Gdk namespace.  You're trying to
pass in the base GTK+ enum instead of the gtkmm one.

Jonner



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