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





沒有留言:

張貼留言

ESP32 and Node-RED with MQTT (Publish and Subscribe)

  ESP32 and Node-RED with MQTT (Publish and Subscribe) 參考來源  https://randomnerdtutorials.com/esp8266-and-node-red-with-mqtt/ mqtt_server = ...