Allow the developer to choose if SetUseBestVisual is called

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-09-18 20:39:08 +00:00
parent 1176111c0d
commit 5fb99fe76f
2 changed files with 5 additions and 2 deletions

View File

@@ -765,10 +765,14 @@ class wxApp(wxPyApp):
error = 'wxApp.error'
outputWindowClass = wxPyOnDemandOutputWindow
def __init__(self, redirect=_defRedirect, filename=None):
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=true):
wxPyApp.__init__(self)
self.stdioWin = None
self.saveStdio = (sys.stdout, sys.stderr)
# This has to be done before OnInit
self.SetUseBestVisual(useBestVisual)
if redirect:
self.RedirectStdio(filename)
# this initializes wxWindows and then calls our OnInit