tkinter:第一個視窗 .2021-01-13修
阿新 • • 發佈:2021-01-14
技術標籤:python-tkinter
import tkinter window = tkinter.Tk() # 建立視窗物件 window.title(' tkinter: 第一個視窗') # 設定視窗標題 window.geometry('320x480') # 設定視窗初始化大小 window.resizable(width=True, height=True) # 設定視窗大小是否可變. False或True window.maxsize(width=480, height=640) # 設定視窗最大值 window.minsize(width=200, height=200) # 設定視窗最小值 window.iconbitmap('favicon32.ico') # 設定視窗圖示 window.mainloop() # 視窗主迴圈