Chapter 5. Creating a Highly Customizable Python Editor
The next project we will be undertaking is a smart text editor for writing Python code. This text editor will have all of the features you would normally expect a text editor to have, including line numbers, a top menu bar, a right-click menu, various customizable key-bindings, a find/replace window, configurable syntax highlighting, and more!
Our first iteration will set up the foundations for our editor. We will start with the basic layout, some of the least complicated and familiar widgets, some key-bindings, and the creation of our find window.
In this chapter, we will cover:
- Using themed
ttkwidgets instead of regulartkones - Styling
tkandttkwidgets - Handling a large amount of text with the
Textwidget - Scrolling with the
Scrollbarwidget - Tkinter's event system
- Creating a second top-level window
With the increase in complexity of this new project, we should also ensure it looks as professional as possible. In order to improve the look...