From the course: Python GUI Development with Tkinter
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Binding to virtual events
From the course: Python GUI Development with Tkinter
Binding to virtual events
- In addition to binding to events created by the user's mouse or keyboard, certain widgets can also trigger what are called virtual events when certain things happen. Often these virtual events are triggered when the user interacts with the widget in a specialized way. If you watch the earlier video about the TreeView widget, then you may remember that we use the bind method, with the TreeView select virtual event, to determine when the user has selected an item from the TreeView. In this video, I'll teach you how to bind to virtual events by using the entry widget as an example, because it has a virtual event from when the user cuts, copies, or pastes text into it. I'll also teach you how to create and manage your own custom virtual events. I'll start by going to the exercise files folder, in the Chapter 7 directory, and making a copy of the template Python file. I'll rename that copy to 04 underscore Virtual and then I'll right-click on it to edit it with IDLE. I'll start by…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.