Re: opening a child window



On 24/04/13 05:40, Andy Gilman wrote:
I seem to be a perpetual newbie and I suspect that there is a pretty
straightforward answer to my question, but so far it has eluded me.  I
have written a small program for my own use that begins with an opening
window and then opens child windows as needed (e.g. to add data, or to
show the data sorted in a particular way).  Using Gtk::Main::run, this
is no problem.  I simply create an instance of the window I want to
call and then "run" it.  But I see that Gtk::Main has been deprecated
and Gtk::Application is preferred.  I can call the initial window with
this, but cannot figure out how to call the child windows.  Any help
would be greatly appreciated.

Andy
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Hi Andy,
Subclass Gtk::Window. Gtk::Dialog is designed as a subclass of Gtk::Window that may fulfil some of the functions you want better and may be worth looking into. If goign with a Gtk::Window, remember that if you use new(), your window will only have a lifetime as long as the calling function, so you need to be careful how you keep it alive. Having it as a child object of another class is a useful way of keeping it alive.

Hope that helps,

Ian.




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