Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Tk MainWindow and another TopLevel spawn order

by Corion (Patriarch)
on Sep 20, 2016 at 09:29 UTC ( [id://1172210]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1172210]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-28 17:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found