This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dominic108
Recipients dominic108
Date 2020-01-01.06:50:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1577861422.75.0.719265816888.issue39171@roundup.psfhosted.org>
In-reply-to
Content
Just to add that I realize now that tkinter is designed for applications with a root window, the "application window". That's why little attention is given to a possible missing root. In fact, it's interesting that we have this code in simpledialog.py: 

     
        # Here, if parent is None, we have a run time error.
        if parent.winfo_viewable():
            self.transient(parent)
 
        if title:
            self.title(title)

        self.parent = parent

        self.result = None

        body = Frame(self)
        self.initial_focus = self.body(body)
        body.pack(padx=5, pady=5)

        self.buttonbox()

        if not self.initial_focus:
            self.initial_focus = self

        self.protocol("WM_DELETE_WINDOW", self.cancel)

        if self.parent is not None:
            self.geometry("+%d+%d" % (parent.winfo_rootx()+50,
                                      parent.winfo_rooty()+50))


But, self.parent will never be None. So the geometry always depends on the parent, which is compatible with the view that we are within an application with a root window - there is always a parent.

But it contradicts a bit, in my view, the "simple" in "simpledialog". What about an application with no root window, like git for example, but which, unlike git,  needs to create a simple dialog in some occasions?
History
Date User Action Args
2020-01-01 06:50:22dominic108setrecipients: + dominic108
2020-01-01 06:50:22dominic108setmessageid: <1577861422.75.0.719265816888.issue39171@roundup.psfhosted.org>
2020-01-01 06:50:22dominic108linkissue39171 messages
2020-01-01 06:50:22dominic108create