From: Mike Hall Date: 2002-04-26T06:56:40+09:00 Subject: Re: Minor Tk bug on Windows? "Hal E. Fulton" wrote: > A TkButton can take the focus when you press > the tab key (as you'd expect), but pressing > Enter then does not activate the button. > Apparently the only way to press a TkButton is > to use the mouse... No. > Can anyone confirm/deny? Yes. From the Tcl/Tk "button" manual page: DEFAULT BINDINGS Tk automatically creates class bindings for buttons that give them default behavior: [1] A button activates whenever the mouse passes over it and deactivates whenever the mouse leaves the button. Under Windows, this binding is only active | when mouse button 1 has been pressed over the but� | ton. [2] A button's relief is changed to sunken whenever mouse button 1 is pressed over the button, and the relief is restored to its original value when but� ton 1 is later released. [3] If mouse button 1 is pressed over a button and later released over the button, the button is invoked. However, if the mouse is not over the button when button 1 is released, then no invoca� tion occurs. >>>> [4] When a button has the input focus, the space key causes the button to be invoked. If the button's state is disabled then none of the above actions occur: the button is completely non-responsive. The behavior of buttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. Works as advertised. Use a 'bind' to augment it. -- Mike Hall http://www.enteract.com/~mghall