StyledTextCtrl class is an advanced text-editing component provided by the
wx.stc module. This class is a
wx wrapper around the Scintilla code editor control. This control is primarily geared toward editing source code files. It provides a large set of features for enhanced code-editing support. In this recipe, we will look at how to set up syntax highlighting for Python source code files using
Perform the following steps:
StyledTextCtrl. Take a look at the following code:
import wx import wx.stc as stc import keyword class CodeEditorBase(stc.StyledTextCtrl): ...