2022年11月17日 星期四

Python GUI 配置管理員pack() EX3.5 , 3.5.1

 # ch3_5.py

from tkinter import *


Reliefs = ["flat","groove","raised","ridge","solid","sunken"]


root = Tk()

root.title("ch3_5")


for Relief in Reliefs:

    Label(root,text=Relief,relief=Relief,

          fg="blue",

          font="Times 20 bold").pack(side=LEFT,padx=5)


root.mainloop()


# ch3_5_1.py

from tkinter import *


bitMaps = ["error","hourglass","info","questhead","question",

           "warning","gray12","gray25","gray50","gray75"]


root = Tk()

root.title("ch3_5_1")


for bitMap in bitMaps:

    Label(root,bitmap=bitMap).pack(side=LEFT,padx=5)


root.mainloop()






沒有留言:

張貼留言

2024_09 作業3 以Node-Red 為主

 2024_09 作業3  (以Node-Red 為主  Arduino 可能需要配合修改 ) Arduino 可能需要修改的部分 1)mqtt broker  2) 主題Topic (發行 接收) 3) WIFI ssid , password const char br...