Optimizing for OS X
Even though wxPython is a native cross platform user interface library, it can still leave gaps on some platforms due to various reasons. Historically, the support in wxPython for Windows and Linux (GTK) has been fairly complete and consistent; however, for OS X, due to its different conventions, available features, as well as user expectations, it requires special attention when developing your application. In this recipe, we will look at some of the important small details to keep in mind when developing a wxPython application that may be deployed on OS X.
How to do it…
Perform the following steps:
First, let's add some code to our app's
OnInit
method to enablewx.SystemOption
, as follows:class OSXApp(wx.App): def OnInit(self): if wx.Platform == '__WXMAC__': spellcheck = "mac.textcontrol-use-spell-checker" wx.SystemOptions.SetOptionInt(spellcheck, 1) self.SetMacHelpMenuTitleName("&Help") self.frame = OSXFrame...