Ensure that runTest is not modal, even when a required module is not

installed.

Create the code page small and hide it to reduce flicker, it will
later be shown and sized correctly when put into the notebook.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-08-25 23:56:43 +00:00
parent 3801d366cb
commit 2e839e966d
4 changed files with 339 additions and 331 deletions

View File

@@ -273,7 +273,7 @@ try:
class DemoCodeEditor(PythonSTC):
def __init__(self, parent):
PythonSTC.__init__(self, parent, -1, wx.BORDER_NONE)
PythonSTC.__init__(self, parent, -1, style=wx.BORDER_NONE)
self.SetUpEditor()
# Some methods to make it compatible with how the wxTextCtrl is used
@@ -443,8 +443,8 @@ try:
except ImportError:
class DemoCodeEditor(wx.TextCtrl):
def __init__(self, parent):
wx.TextCtrl.__init__(self, parent, -1, style = wx.TE_MULTILINE |
wx.HSCROLL | wx.TE_RICH2 | wx.TE_NOHIDESEL)
wx.TextCtrl.__init__(self, parent, -1, style =
wx.TE_MULTILINE | wx.HSCROLL | wx.TE_RICH2 | wx.TE_NOHIDESEL)
def RegisterModifiedEvent(self, eventHandler):
self.Bind(wx.EVT_TEXT, eventHandler)
@@ -482,7 +482,8 @@ modDefault = modOriginal
class DemoCodePanel(wx.Panel):
"""Panel for the 'Demo Code' tab"""
def __init__(self, parent, mainFrame):
wx.Panel.__init__(self, parent)
wx.Panel.__init__(self, parent, size=(1,1))
self.Hide()
self.mainFrame = mainFrame
self.editor = DemoCodeEditor(self)
self.editor.RegisterModifiedEvent(self.OnCodeModified)