2022年11月16日 星期三

Python GUI 標籤 Label ---- EX2.3 , 2.4 , 2.5 , 2.6 , 2.6.1

 # ch2_3.py

from tkinter import *

root = Tk()

root.title("ch2_3")

label=Label(root,text="I like tkinter",

            fg="blue",bg="yellow")

label.pack()  

root.mainloop()





# ch2_4.py
from tkinter import *

root = Tk()
root.title("ch2_4")
label=Label(root,text="I like tkinter",
            fg="blue",bg="yellow",
            height=3,width=15)
label.pack()  

root.mainloop()



# ch2_5.py
from tkinter import *

root = Tk()
root.title("ch2_5")
label=Label(root,text="I like tkinter",
            fg="blue",bg="yellow",
            height=3,width=15,
            anchor="nw")
label.pack()  

root.mainloop()






# ch2_6.py
from tkinter import *

root = Tk()
root.title("ch2_6")
label=Label(root,text="I like tkinter",
            fg="blue",bg="yellow",
            height=3,width=15,
            anchor="se")
label.pack()  

root.mainloop()






# ch2_6_1.py
from tkinter import *

root = Tk()
root.title("ch2_6_1")
label=Label(root,text="I like tkinter",
            fg="blue",bg="yellow",
            height=3,width=15,
            anchor=SE)
label.pack()  

root.mainloop()






沒有留言:

張貼留言

WOKWI 模擬RFID UID產生 暨 4LED on,off,flash控制(1)

WOKWI 模擬RFID UID產生 暨 4LED on,off,flash控制(1) #include < ArduinoMqttClient.h > #include < WiFi.h > //MFRC522 程式庫  模擬mfrc522 送出卡號...