Popular recipes tagged "buddy"http://code.activestate.com/recipes/tags/buddy/popular/2017-04-07T11:45:19-07:00ActiveState Code RecipesTkinter buddies or shorcuts (Python) 2017-04-07T11:45:19-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580775-tkinter-buddies-or-shorcuts/ <p style="color: grey"> Python recipe 580775 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/accelerator/">accelerator</a>, <a href="/recipes/tags/buddies/">buddies</a>, <a href="/recipes/tags/buddy/">buddy</a>, <a href="/recipes/tags/shorcut/">shorcut</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 2. </p> <p>I provide two convenience functions to create shorcuts. <em>create_buddy</em> creates a buddy for the provided label.A buddy establish a connection between a label and a related widget. It provides a quick keyboard shorcut to focus its partner widget. (Buddy is a terminology used in PyQt).</p> <p><em>create_shortcut_to_button</em> creates a shorcut to invoke a button.</p> <p>I bind to toplevel containing the widget. This way, when the dialog is closed all the bindings disappear.</p> <p>All shorcuts are of this form: Alt + letter</p> <p>Buddies and shorcuts enriches the user experience providing new ways to navigate and interact quickly with the application.</p>