: '''tkwait visibility''' ''name'' Waits for a change in the visibility state (as indicated by the arrival of a `` [event]) of window ''name''. This is typically used to wait for a newly-created window to appear on the screen before taking some action. Returns an empty string. Note that this command is not particularly useful on non-[X11] platforms (Windows, OSX/Aqua) because `` events are never delivered. This is a platform limitation. [HaO] 2015-12-03: I dod not know that tkwait visibility does not work on windows. For me, it works quite good. ---- <> Windows bug or whatever - looking for help [HaO] 2015-12-02: I had an issue today with [tkwait visibility], I could not really track down. A large application does the following: ======tcl # hide main window on initialisation wm deiconify . update # initialisation of many things including main window wm state . normal catch {tkwait visibility .} ;# if error etc ommitted for clarity wm geometry . $SavedGeometry ====== Under strange totally unrelated circumstances (empty config file not present)but repeatable, the tkwait waits forever. Thus, I have modified it as follows: ======tcl # hide main window on initialisation wm deiconify . update # initialisation of many things including main window wm state . normal if {[winfo ismapped .]} { catch {tkwait visibility .} ;# if error etc ommitted for clarity } wm geometry . $SavedGeometry ====== The "winfo ismapped" is only 0 if the tkwait will stall. I tried thousands of other things including update, wm deiconfy etc. With the upper patch, the window shows up quite delayed when tkwait is not used, but it shows up. The wm geometry is eventually not correctly honored (what the tk visibility is for) but that is better than nothing. Anybody with the same experience may add to wether nail it down to a test script or whatever. This is: * TCL 8.6.4 32 bit * Windows 10 64 bit (German) <> ---- **See also** * [bind] * [event] * [tkwait] * [tkwait variable] * [tkwait window] <> Tk syntax help | Command