O'Reilly logo

WxPython Application Development Cookbook by Cody Precord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing highlighting in StyledTextCtrl

The StyledTextCtrl provides a vast number of built-in lexers to provide syntax highlighting of various types of programming languages. Its API also allows us to extend these capabilities by providing our own custom styling of text in the buffer. This can be useful to create a text editor for your own custom markup or for special text formatting. In this recipe, we will take a look at how to implement custom text styling in StyledTextCtrl.

Getting ready

If you haven't already, you may want to jump back and take a look at the other StyledTextCtrl recipes in Chapter 4, Containers and Advanced Controls, to get some familiarity with StyledTextCtrl prior to continuing with this recipe.

How to do it…

Here are the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required