Message384778
Fair point about being "too" long. Having seen a "short" example that, unfortunately, didn't actually exhibit the problem, I thought that providing a "smallish" example that definitely did exhibit the issue was quicker than, potentially, spending more time than necessary cutting it down.
However, for the record, hope the below example is better. As before, changing:
self.createWidgets()
to:
self.after_idle(self.createWidgets())
avoids the issue.
-----
#!/usr/bin/python3
import tkinter as tk
from tkinter import messagebox
class Application(tk.Frame):
def __init__(self, master):
super().__init__(master)
self.master = master
self.pack()
self.createWidgets()
def createWidgets(self):
tk.messagebox.askquestion("Use An Existing File", "Do you want to load and use an existing file?")
tk.Entry(self.master, width = 20).pack()
if __name__ == "__main__":
root = tk.Tk()
app = Application(root)
app.mainloop() |
|
Date |
User |
Action |
Args |
2021-01-10 21:14:18 | jmccabe | set | recipients:
+ jmccabe, terry.reedy, christian.heimes, serhiy.storchaka, epaine |
2021-01-10 21:14:18 | jmccabe | set | messageid: <1610313258.29.0.996658636226.issue42867@roundup.psfhosted.org> |
2021-01-10 21:14:18 | jmccabe | link | issue42867 messages |
2021-01-10 21:14:17 | jmccabe | create | |
|