RE: [gtkmm] Child Windows?

I have another aproach to this. I dont know weather is better or worse.

I preffer to have one main window and other windows derived from 
Gtk::Window. This other windows are members of the class MainWindow

MainWindow: public Gtk::Window
OtherWindow1 otherwindow1;
OtherWindow2 otherwindow2;

I dont show() on the constructors of OtherWindow, so this windows are 
hidden in the begining og the program. You can use a callback on a button 
or menu of MainWindow to call the show() method of the OtherWindow class, 
a callback on a button or menu on the OtherWindow class to hide the 
window using the hide() method.

I use the 
OptionsDialog *my_options_dialog = new OptionsDialog(this);
approach only when using a modal Gtk::Dialog , which effectively blocks 
the GUI.

I hope that helps.

                 Sergio Pascual Ramírez       spr astrax fis ucm es
               Tf: (+34)  91-394-50-18      Fax: (+34)  91-394-46-35
                      Dept. Astrofísica Facultad de C.C. Físicas 
                          Universidad Complutense de Madrid
                                 28040 Madrid (Spain)
            Spanish junior researchers fight for employment rights 

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