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()






沒有留言:

張貼留言

Messaging API作為替代方案

  LINE超好用功能要沒了!LINE Notify明年3月底終止服務,有什麼替代方案? LINE Notify將於2025年3月31日結束服務,官方建議改用Messaging API作為替代方案。 //CHANNEL_ACCESS_TOKEN = 'Messaging ...