Theo_124 has asked for the wisdom of the Perl Monks concerning the following question:
Right now, I'm destroying the main window and re-creating it for each different screen layout.
to create it and$mw = new MainWindow;
to destroy it.$mw->destroy;
Then, for the next screen, I just create the main window again. I don't know if this is likely to cause me trouble in the future or not.
NOTE: This also means that I have multiple MainLoop calls - one for each screen. I don't know if this is very bad GUI programming style or not.
I'm currently having trouble giving focus to my "new" main window that appears after the user makes a selection from the main menu. The focus is transferred to my console window (probably when I destroy the main window), but I can't get it back to the main window once another one is created. I'm now experimenting with Toplevel windows and they appear to behave better, but this may introduce different problems.
I've been searching for guidance on this fundamental aspect of GUI programming, but I have not found any reference to it in Mastering Perk/Tk or on-line searches.
I'm stumbling around in the dark on this one. Could someone out there with Perl/tk experience please give me some advice?
Thank you very much for any suggestions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl/tk - how to handle screen transitions - can I destroy the main window?
by Joost (Canon) on Mar 28, 2008 at 22:01 UTC | |
by Anonymous Monk on Mar 29, 2008 at 14:10 UTC | |
|
Re: Perl/tk - how to handle screen transitions - can I destroy the main window?
by JStrom (Pilgrim) on Mar 28, 2008 at 21:46 UTC | |
|
Re: Perl/tk - how to handle screen transitions - can I destroy the main window?
by zentara (Cardinal) on Mar 29, 2008 at 16:43 UTC |