Tkinter 对话框问题

Tkinter Dialogue box issues

我有一些这样的代码:

import tkinter as tk
from tkinter import Entry, Label, Text, Button, W, SE, simpledialog

app_window = tk.Tk() #root
name = simpledialog.askfloat('hello', 'What is your name?: ',
                                  parent = app_window)
age = simpledialog.askfloat('hello', 'What is your age?: ',
                                    parent = app_window)
address = simpledialog.askfloat('hello', 'What is your address?: ',
                                    parent = app_window)

有没有办法阻止主要 window 在对话框顶部弹出?

正如OP所说,答案是使用app_window.withdraw().withdraw() 函数最小化一个小部件。

了解更多信息 here

希望对您有所帮助!