Summary

With the end of this chapter, the ttk set of widgets has now been added to our arsenal of tools, and we know why they would be used (to capture a more native feel) and how to style them using a Style object. Learning about style inheritance will enable us to better plan how we go about styling ttk widgets in a larger application.

We have also had a look at the styling options of the built-in widgets should we prefer to stick with those for their ease of use.

We have had a brief look at how Tkinter handles a large body of formatted text with the Text widget.  We've previewed a couple of configurations and are ready to take a deeper dive into this widget in the next chapter, learning how to style and search this widget.

The built-in event system in Tkinter has been explored, allowing us to listen for keyboard and mouse input and execute Python code in response. We also understand that widgets may have their own default responses to some input, but we can overwrite them using the break string.

Our text editor application has its roots set with three classes handling the main window and widgets, the Text widget subclass, and a separate find/replace window, which we will be able to spawn atop our main window when we have combined them.

Next in line for our editor will be syntax highlighting. We will learn how to search around our Text widget quickly, finding keywords in the Python language and changing their color. We can then combine this ability to search with our find/replace window to make this function as it should.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset