亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Tkinter 標簽不會出現在框架內

Tkinter 標簽不會出現在框架內

小唯快跑啊 2024-01-24 16:19:05
import res = "Product desingATK 30Trace back. TheATK 30 is a nice device. "keywords = ['ATK 30', 'PPK 50', 'HJF12 10']pattern = fr'\s*({"|".join(sorted(map(re.escape, keywords),key=len,reverse=True))})\s*'print(pattern)                       # => \s*(HJF12\ 10|ATK\ 30|PPK\ 50)\s*print(re.sub(pattern, r' \1 ', s))  # => Product desing ATK 30 Trace back. The ATK 30 is a nice device. 
查看完整描述

1 回答

?
蠱毒傳說

TA貢獻1895條經驗 獲得超3個贊

初始化后修復網格小框架的小問題


from tkinter import *


root = Tk()

root.geometry('700x500')


# Big Frame

big_frame = LabelFrame(root, text='Big Frame', width=350, height=450, padx=5, pady=5)

big_frame.grid(row=0, column=0, padx=(1, 0), sticky='nsew')  # the sticky prevents the label from being inside the frame


root.rowconfigure(0, weight=1)

root.columnconfigure(0, weight=1)


# Small Frame

small_frame = LabelFrame(big_frame, text='Small Frame', width=120, height=200)

small_frame.grid(row=0, column=0)


label = Label(small_frame, text='Label')

label.grid(row=0, sticky='nw')



mainloop()


查看完整回答
反對 回復 2024-01-24
  • 1 回答
  • 0 關注
  • 148 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號