2022年11月16日 星期三

Python GUI 標籤 Label ---- EX.13, 2.14 , 2.15 , 2.16

 # ch2_13.py

from tkinter import *

root = Tk()

root.title("ch2_13")

label=Label(root,bitmap="hourglass")

label.pack()  

root.mainloop()



# ch2_14.py

from tkinter import *

root = Tk()

root.title("ch2_14")

label=Label(root,bitmap="hourglass",

            compound="left",text="我的天空")

label.pack()  

root.mainloop()


# ch2_15.py

from tkinter import *


root = Tk()

root.title("ch2_15")

label=Label(root,bitmap="hourglass",

            compound="top",text="我的天空")

label.pack()  


root.mainloop()



# ch2_16.py

from tkinter import *

root = Tk()

root.title("ch2_16")

label=Label(root,bitmap="hourglass",

            compound="center",text="我的天空")

label.pack()  

root.mainloop()





沒有留言:

張貼留言

WOKWI ESP32 LED Control , Node-Red MQTT SQLITE  

WOKWI ESP32 LED Control ,  Node-Red  MQTT SQLITE   const char broker[] = "test.mosquitto.org" ; //const char broker[] = "br...