How to change or remove submenu border of Tkinter's OptionMenu widget?

安稳与你 提交于 2019-12-10 18:05:52

问题


I'm trying to get rid of the thick border showing up when I changed the optionmenu and submenu background and foreground color.

I did manage to get rid or modify the parent optionmenu border by using:

optmenu.configure(hilightthickness=0)

There's a reference here changing the background color of the submenu:

How to change menu background color of Tkinter's OptionMenu widget?

..but I can't seem to find a way to remove the outer border showing up on the submenu. Tried hilighthickness=0 but it's no good.

I'm using Windows 7 and Python 2.7.

Any ideas? thanks.


回答1:


There should be a bd option, just do something like:

bd=0

Just add it when you are defining all the options for it.



来源:https://stackoverflow.com/questions/14096468/how-to-change-or-remove-submenu-border-of-tkinters-optionmenu-widget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!