John Elder of Codemy recently started a project where we will build an interactive text editor. The tutorial was divided into multiple parts where John will teach us how to build this simple Python GUI app from scratch. The previous videos taught us to build the widget and add some common functionalities to it including the ability to open and save files to a directory.
This time, we will learn how to format texts that users selected. In this video, he will show us how to create Text Widget tags to change selected text to Bold or Italics. He will also show us how to highlight text in the Text box using your mouse and then do things programmatically with the selected text. Text widgets have something called tags that we can create, add, and remove. These tags allow us to define things that we want to do to selected text in the Text Widget…like make it bold, or italics, or anything we want. Feel free to watch the video below to learn more.