python3学习手册pack_propagate(True) # True表示窗口内的控件大小自适 应,False表示不自适应,需要手动设置控件坐标及大小 window.configure(bg="green") # window.configure(background="#00FF00") # bg为 background的缩写,颜色可写英文单词,也可写#RGB label = tkinter.Label(window, text="Hello title("abc") # 设置窗口标题 main_window.geometry("480x320+100+100") # 设置窗口大小及位 置,宽x高+横坐标+纵坐标 main_window.configure(bg="green") def click_exit_button(pop_window): pop_window.destroy() main_window.attributes("-disabled" 口对象 pop_window.title("子窗口") pop_window.geometry("300x200+100+100") pop_window.configure(bg="pink") pop_window.protocol("WM_DELETE_WINDOW", on_closing) # 子窗口点击右上角的关闭按钮后,触发此函数 exit_button0 码力 | 213 页 | 3.53 MB | 1 年前3
共 1 条
- 1













