简体   繁体   English

Mac上的wxpython-按钮样式

[英]wxpython on Mac - button style

I am using wxPython3.0-osx-cocoa-py2.7 on Mac 10.11.5 with python 2.7.11. 我在Mac 10.11.5和python 2.7.11上使用wxPython3.0-osx-cocoa-py2.7。 Looking at the documentation, for wxmac it show the buttons looking like this: 查看文档,对于wxmac,它显示如下所示的按钮:

在此处输入图片说明

But my buttons look like this: 但是我的按钮看起来像这样:

在此处输入图片说明

I am using this code: 我正在使用此代码:

closeBtn = wx.Button(self, -1, "Close")
closeBtn.Bind(wx.EVT_BUTTON, self.OnClose)

How can I get mey buttons to look like the wxmac example? 我怎样才能使按钮看起来像wxmac示例?

The image in the documentation was from a screenshot in an older version of OSX. 文档中的图像来自旧版本OSX中的屏幕截图。 Since wxPython uses the native widgets, then they always look the same as the widgets in the current version of the OS (because they are the same widget). 由于wxPython使用本机窗口小部件,因此它们始终与当前版本的OS中的窗口小部件看起来相同(因为它们是同一窗口小部件)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM