mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Enable the use of the WIT in the simple sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -6,6 +6,13 @@
|
|||||||
|
|
||||||
import wx
|
import wx
|
||||||
|
|
||||||
|
USE_WIT = False
|
||||||
|
|
||||||
|
AppBaseClass = wx.App
|
||||||
|
if USE_WIT:
|
||||||
|
from wx.lib.mixins.inspection import InspectableApp
|
||||||
|
AppBaseClass = InspectableApp
|
||||||
|
|
||||||
|
|
||||||
class MyFrame(wx.Frame):
|
class MyFrame(wx.Frame):
|
||||||
"""
|
"""
|
||||||
@@ -78,12 +85,15 @@ class MyFrame(wx.Frame):
|
|||||||
print("Having fun yet?")
|
print("Having fun yet?")
|
||||||
|
|
||||||
|
|
||||||
class MyApp(wx.App):
|
class MyApp(AppBaseClass):
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
frame = MyFrame(None, "Simple wxPython App")
|
frame = MyFrame(None, "Simple wxPython App")
|
||||||
self.SetTopWindow(frame)
|
self.SetTopWindow(frame)
|
||||||
|
|
||||||
print("Print statements go to this stdout window by default.")
|
print("Print statements go to this stdout window by default.")
|
||||||
|
if USE_WIT:
|
||||||
|
print("Press Ctrl-Alt-I (Cmd-Opt-I on Mac) to launch the WIT.")
|
||||||
|
self.InitInspection()
|
||||||
|
|
||||||
frame.Show(True)
|
frame.Show(True)
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user