Recipe 8-1. Binding Multiple Widgets to the Same Handler
Problem
From time to time, you will find that you need to have multiple buttons call the same event handler. Usually this happens when you have more than one button that does very similar things. Other times, you’ll want to bind a Close button and a Close menu item to the same event handler
so you don’t have multiple functions that do the same thing. This followd the
Don’t Repeat Yourself (DRY) Principle
.
Solution
Figure 8-1
Binding multiple ...