是否可以将复选框描述移近复选框
character_set = LabelFrame(text=" Example ")
checkbtn0 = PhotoImage(file="example_off.png")
checkbtn1 = PhotoImage(file="example_on.png")
checktestbox = IntVar()
checktest = Label(character_set, image=checkbtn0)
checktest.bind("<Button-1>", Custom)
checktest.grid(padx=8, pady=4, row=0, column=0)
checktext = Label(character_set, text="Upper case (A-Z)")
checktext.grid(row=0, column=1)
character_set.pack(fill="both", expand="yes", padx=4, pady=4)
相关的:
参考:
The Tkinter Label Widget - ^{}
The Tkinter Place Geometry Manager
The Tkinter Checkbutton Widget
使用
Frame
、Label
组合您自己的Checkbutton
小部件使用
Label(..., compound='left')
使用
.place(x, y)
从
class tk.Checkbutton
继承,使用您自己的图像看到这个答案:checkbutton different image
您正在使用
这将在
8 pixels
的左右两侧添加Label
要减少甚至设置为
0
,请改用此选项:这允许在左侧和右侧填充不同的值
我要说的是
padx
在HTML中类似于左填充和右填充。如果完全删除
padx
,则左填充和右填充将是zero
相关问题 更多 >
编程相关推荐