diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index 85ecd4a2ae..071b447636 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -209,6 +209,7 @@ _treeList = [ #--------------------------------------------------------------------------- +# Show how to derive a custom wxLog class class MyLog(wx.PyLog): def __init__(self, textCtrl, logTime=0): @@ -232,6 +233,7 @@ class MyTP(wx.PyTipProvider): # A class to be used to display source code in the demo. Try using the # wxSTC in the wxStyledTextCtrl_2 sample first, fall back to wxTextCtrl # if there is an error, such as the stc module not being present. +# try: ##raise ImportError diff --git a/wxPython/demo/wxStyledTextCtrl_2.py b/wxPython/demo/wxStyledTextCtrl_2.py index 3fa0033aaa..d19196f07f 100644 --- a/wxPython/demo/wxStyledTextCtrl_2.py +++ b/wxPython/demo/wxStyledTextCtrl_2.py @@ -104,9 +104,9 @@ class PythonSTC(wxStyledTextCtrl): self.StyleSetSpec(wxSTC_STYLE_BRACEBAD, "fore:#000000,back:#FF0000,bold") # Python styles - # White space - self.StyleSetSpec(wxSTC_P_DEFAULT, "fore:#808080,face:%(helv)s,size:%(size)d" % faces) - # Comment + # Default + self.StyleSetSpec(wxSTC_P_DEFAULT, "fore:#000000,face:%(helv)s,size:%(size)d" % faces) + # Comments self.StyleSetSpec(wxSTC_P_COMMENTLINE, "fore:#007F00,face:%(other)s,size:%(size)d" % faces) # Number self.StyleSetSpec(wxSTC_P_NUMBER, "fore:#007F7F,size:%(size)d" % faces) @@ -127,7 +127,7 @@ class PythonSTC(wxStyledTextCtrl): # Operators self.StyleSetSpec(wxSTC_P_OPERATOR, "bold,size:%(size)d" % faces) # Identifiers - self.StyleSetSpec(wxSTC_P_IDENTIFIER, "fore:#808080,face:%(helv)s,size:%(size)d" % faces) + self.StyleSetSpec(wxSTC_P_IDENTIFIER, "fore:#000000,face:%(helv)s,size:%(size)d" % faces) # Comment-blocks self.StyleSetSpec(wxSTC_P_COMMENTBLOCK, "fore:#7F7F7F,size:%(size)d" % faces) # End of line where string is not closed diff --git a/wxPython/demo/wxTextCtrl.py b/wxPython/demo/wxTextCtrl.py index 1045efe3d0..5425b6e9c1 100644 --- a/wxPython/demo/wxTextCtrl.py +++ b/wxPython/demo/wxTextCtrl.py @@ -29,7 +29,7 @@ class TestPanel(wxPanel): EVT_KILL_FOCUS(t1, self.OnKillFocus) EVT_WINDOW_DESTROY(t1, self.OnWindowDestroy) - l2 = wxStaticText(self, -1, "Passsword") + l2 = wxStaticText(self, -1, "Password") t2 = wxTextCtrl(self, -1, "", size=(125, -1), style=wxTE_PASSWORD) EVT_TEXT(self, t2.GetId(), self.EvtText) @@ -47,8 +47,6 @@ class TestPanel(wxPanel): b3 = wxButton(self, -1, "Test WriteText") EVT_BUTTON(self, b3.GetId(), self.OnTestWriteText) self.tc = t3 - b4 = wxButton(self, -1, "Test Simulated Event") - EVT_BUTTON(self, b4.GetId(), self.OnTestEvent) l4 = wxStaticText(self, -1, "Rich Text") @@ -74,7 +72,6 @@ class TestPanel(wxPanel): bsizer.Add(b, 0, wxGROW|wxALL, 4) bsizer.Add(b2, 0, wxGROW|wxALL, 4) bsizer.Add(b3, 0, wxGROW|wxALL, 4) - bsizer.Add(b4, 0, wxGROW|wxALL, 4) sizer = wxFlexGridSizer(cols=3, hgap=6, vgap=6) sizer.AddMany([ l1, t1, (0,0), @@ -133,14 +130,6 @@ class TestPanel(wxPanel): % (ip, text[ip], lp, len(text))) - def OnTestEvent(self, evt): - ke = wxKeyEvent(wxEVT_CHAR) - ke.SetEventObject(self.tc1) - ke.SetId(self.tc1.GetId()) - ke.m_keyCode = ord('A') - self.tc1.GetEventHandler().ProcessEvent(ke) - - #--------------------------------------------------------------------------- def runTest(frame, nb, log):