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



沒有留言:

張貼留言

Node-Red 抓取 opendata 的資料集產生AQI 空氣品質指

Node-Red 抓取 opendata 的資料集產生AQI 空氣品質指標 實現透過 Node-RED 抓取環境部 OpenData(空氣品質 AQI)資料,最核心的流程為: 注入觸發(Inject) → HTTP 請求(http request) → 解析 JSON 資料(Fu...