[Tutor] Modifying Grayson's Example 5_14
Martin Walsh
mwalsh at mwalsh.org
Tue Mar 17 15:33:04 CET 2009
> Martin Walsh wrote:
>> Wayne Watson wrote:
>> ....
>>
>>
>>> it. It works pretty well, but puts up a a few probably top level
>>> windows that are blank. How do I get around them, and is there anything
>>>
>>
>> ....
>>
>>
>>> root = Tk()
>>>
>>
>> Try adding this,
>>
>> root.withdraw()
>>
>>
>>> dialog = GetPassword(root)
>>>
>>
>> HTH,
>> Marty
Wayne Watson wrote:
> That worked. Why the "extra" blank window though?
I'm no Tkinter expert -- far from it. But I would assume that
GetPassword, as a subclass of Dialog, creates a new window, and thus you
have no need for the root window. root.withdraw() hides the root window
from view, and allows the application to continue running. I imagine
there are other ways to accomplish the same thing.
HTH,
Marty
More information about the Tutor
mailing list