2022年11月16日 星期三

Python GUI 標籤 Label L1

import tkinter as tk

win = tk.Tk()

win.title("Python Label")

win.geometry('400x200')

win.iconbitmap('t1.ico')

# 若內容是文字則以字元為單位,圖像則以圖元為單位

label = tk.Label(win, text="網址:https://alex9ufoexploer.blogspot.com ",font=('宋體',20, 'bold italic'),bg="#7CCD7C",

# 設置標籤內容區大小

width=40,height=5,

# 設置填充區距離、邊框寬度和其樣式(凹陷式)

padx=10, pady=15, borderwidth=10, relief="sunken")

label.pack()

win.mainloop()



沒有留言:

張貼留言

Modbus FC=1 (Coils read) & FC=15 (Coils Write)

Modbus FC=1  (Coils read)  & FC=15 (Coils Write)   「從 Modbus 設備讀取多個線圈(Coils)狀態,並立刻將這些狀態原封不動地轉寫到另一個記憶體位址(起始位址 16)」 。 整個流程使用了知名套件 node-red...