[gtkmm] popup window



Hello,

I have some buttons which have to open new windows when we click on them. I do it like that :

void Monitor::on_button_click()
{
 std::cout << "Monitor : on_button_click" << endl;

 Gtk::Window *wind;
 wind = Gtk::manage(new Gtk::Window);

 Gtk::Button *b;
 b = Gtk::manage(new Gtk::Button("test"));
 wind->add(*b);

 wind->show_all();

}

It seems working but I wondered if there was a better way to do that.

Cheers,

Karim.





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