我已經找到一種方法來query whether a tk window is maximized: library(tcltk)
w <- tktoplevel()
tkwm.state(w) # Query the current state; returns "normal" if not maximized
# The possible states for a window incl
我想顯示一個目錄選擇對話框(用於獲取路徑,然後用於保存下載的東西)。代碼在IDLE中運行良好,但是當我嘗試運行它時CMD我得到這個錯誤 NameError: name 'Tk' is not defined 我使用Tkinter的GUI的。 代碼段 from tkinter import filedialog
root = Tk()
root.withdraw()
filename = fi