in reply to Tk MainWindow and another TopLevel spawn order
One ugly (ugly!) way that comes immediately to my mind is to use Tk::after:
# Spawn as soon as possible when the Tk main loop runs: $phwin->after(0, \&secondary_win);
I'm sure there also is a Tk event that is fired once the main window has drawn itself, and maybe you can initialize your secondary window from there? I don't readily see convenient callbacks for Window events in the Tk documentation, but there should be more things than just timer events.
|
|---|