[Zope-Checkins] CVS: Zope3/utilities - unittestgui.py:1.6
Martijn Pieters
mj@zope.com
Fri, 28 Jun 2002 00:28:25 -0400
Update of /cvs-repository/Zope3/utilities
In directory cvs.zope.org:/tmp/cvs-serv24836
Modified Files:
unittestgui.py
Log Message:
Give the close button of a warning window focus, so that simply hitting the
spacebar will close the window (liek Fred's patch for the error window).
=== Zope3/utilities/unittestgui.py 1.5 => 1.6 ===
foreground="black", justify=tk.LEFT).pack(anchor=tk.W)
tk.Label(window, text=error, justify=tk.LEFT).pack()
- tk.Button(window, text="Close",
- command=window.quit).pack(side=tk.BOTTOM)
+ b = tk.Button(window, text="Close",
+ command=window.quit)
+ b.pack(side=tk.BOTTOM)
+ b.focus_set()
window.bind('<Key-Return>', lambda e, w=window: w.quit())
window.mainloop()
window.destroy()