python - 如何在 tkinter GUI 上使按钮变平
问题描述
你好美丽的社区。我正在研究覆盆子上的 tkinter GUI。好吧,首先我开始在 Windows 上编写我的 gui,我想让我的按钮在屏幕上看起来很平,边缘没有任何线条,并且使用浮雕 ='flat'效果很好,但是当我完成我的项目并在我的树莓上运行我的程序时我的按钮在边缘有那些线条,看起来relief='flat' 没有任何效果,我尝试使用relief=FLAT,但仍然存在同样的问题
在这里您可以看到正在运行的程序的屏幕截图和我的按钮周围的线条
这是我的代码
bouton_break = Button(f2, image=img_break, relief='flat' , command = break_ ) #break
bouton_break.place(bordermode=OUTSIDE, height=134, width=107, x=40 , y=200)
bouton_MM = Button(f2, image=img_MM, relief='flat', command=maint_page)
bouton_MM.place(bordermode=OUTSIDE, height=134, width=107, x=170 , y=200)
boutonlogout = Button(f2, image=img_logout , relief='flat', command = logout_cmd) #logout
boutonlogout.place(bordermode=OUTSIDE, height=134, width=107, x=300 , y=200)
解决方案
设置按钮边框 = 0。
bd=0
(满足 SO 的额外字符)
推荐阅读
- php - CodeIgniter - 如何在客户端对表格进行排序?
- python-3.x - /new-watch-hour-graph/ 处的 IndexError
- c++ - C++ 宏定义和取消定义
- java - 尽管将非空输入流传递给 WorkbookFactory,但仍出现 EmptyFileException
- php - 分类的颜色选择器
- ios - 在 iTunes 连接中测试用户创建
- selenium - WebDriverException 元素在 Selenium 中不可点击
- c# - 将异步函数存储为变量
- java - Java 网络套接字。WebSocket会话ID
- c - 指针可以指向订单列表项的结构吗