]>
Commit | Line | Data |
---|---|---|
9e46ac75 RD |
1 | |
2 | ||
3 | from wxPython.wx import * | |
714d23b4 | 4 | from wxPython.ste import wxStyledTextCtrl |
9e46ac75 RD |
5 | |
6 | ||
7 | app = wxPySimpleApp() | |
8 | frame = wxFrame(None, -1, "Testing...", (0,0), (320,480)) | |
714d23b4 | 9 | ed = wxStyledTextCtrl(frame, -1) |
9e46ac75 RD |
10 | ed.AddText(open('test7.py').read()) |
11 | ||
12 | #ed.AddText("This is a test\nThis is only a test.\n\nHere we go cowboys, here we go!!!\nThe End") | |
13 | #ed.SetBufferedDraw(false) | |
14 | ||
15 | #ed.StyleSetFontAttr(1, 14, "Times New Roman", true, false) | |
16 | #ed.StyleSetForeground(1, wxBLUE) | |
17 | #ed.StyleSetFont(2, wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, false)) | |
18 | ||
19 | #ed.StartStyling(48, 0xff) | |
20 | #ed.SetStyleFor(7, 1) | |
21 | ||
22 | ||
23 | frame.Show(true) | |
24 | app.MainLoop() |