X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65ec6247df6af7b6489257b1ac04ca2242dc14ec..2da6105611475cb08135997c587df72be67840bd:/wxPython/demo/wxStyledTextCtrl_2.py diff --git a/wxPython/demo/wxStyledTextCtrl_2.py b/wxPython/demo/wxStyledTextCtrl_2.py index 52597a671e..6bf1f3f418 100644 --- a/wxPython/demo/wxStyledTextCtrl_2.py +++ b/wxPython/demo/wxStyledTextCtrl_2.py @@ -21,8 +21,8 @@ if wxPlatform == '__WXMSW__': 'mono' : 'Courier New', 'helv' : 'Arial', 'other': 'Comic Sans MS', - 'size' : 8, - 'size2': 6, + 'size' : 10, + 'size2': 8, } else: faces = { 'times': 'Times', @@ -111,12 +111,12 @@ class PythonSTC(wxStyledTextCtrl): # Comment-blocks self.StyleSetSpec(wxSTC_P_COMMENTBLOCK, "fore:#7F7F7F,size:%(size)d" % faces) # End of line where string is not closed - self.StyleSetSpec(wxSTC_P_STRINGEOL, "fore:#000000,face:%(mono)s,back:#E0C0E0,eolfilled,size:%(size)d" % faces) + self.StyleSetSpec(wxSTC_P_STRINGEOL, "fore:#000000,face:%(mono)s,back:#E0C0E0,eol,size:%(size)d" % faces) self.SetCaretForeground("BLUE") - EVT_KEY_UP(self, self.OnKeyPressed) + EVT_KEY_DOWN(self, self.OnKeyPressed) def OnKeyPressed(self, event): @@ -135,9 +135,20 @@ class PythonSTC(wxStyledTextCtrl): #st = string.join(lst) #print len(st) #self.AutoCompShow(0, st) - self.AutoCompSetIgnoreCase(true) - self.AutoCompShow(0, string.join(keyword.kwlist)) - self.AutoCompSelect('br') + + kw = keyword.kwlist[:] + kw.append("zzzzzz") + kw.append("aaaaa") + kw.append("__init__") + kw.append("zzaaaaa") + kw.append("zzbaaaa") + kw.append("this_is_a_longer_value") + kw.append("this_is_a_much_much_much_much_much_much_much_longer_value") + + kw.sort() # Python sorts are case sensitive + self.AutoCompSetIgnoreCase(false) # so this needs to match + + self.AutoCompShow(0, string.join(kw)) else: event.Skip()