[英]How to add border to a button in python for Tkinter?
b1 = Button(tk, text=" ", font=("Consolas 30 bold"), height = 1, width = 4,bg = "white", command=lambda:checker(b1))
我要添加什么代碼以在按鈕上添加邊框,例如使其更粗?
根據http://effbot.org/tkinterbook/button.htm :
borderwidth= variable
按鈕邊框的寬度。 默認值是特定於平台的,但通常為1或2像素。 (borderWidth / BorderWidth)
不要與:
highlightthickness= variable
高亮邊框的寬度。 默認值是特定於系統的(通常為一或兩個像素)。 (highlightThickness / HighlightThickness)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.