Inhibit setting of default root window. Call this function to inhibit that the first instance of Tk is used for windows without an explicit parent window.
()
| 297 | |
| 298 | |
| 299 | def NoDefaultRoot(): |
| 300 | """Inhibit setting of default root window. |
| 301 | |
| 302 | Call this function to inhibit that the first instance of |
| 303 | Tk is used for windows without an explicit parent window. |
| 304 | """ |
| 305 | global _support_default_root, _default_root |
| 306 | _support_default_root = False |
| 307 | # Delete, so any use of _default_root will immediately raise an exception. |
| 308 | # Rebind before deletion, so repeated calls will not fail. |
| 309 | _default_root = None |
| 310 | del _default_root |
| 311 | |
| 312 | |
| 313 | def _get_default_root(what=None): |