in reply to It seems that Tk has an error in some version
Only one widget can have keyboard focus at a time, often you will see a binding like this, to ensure an entry or text widget always gets keyboard focus:$ent->focus; MainLoop;
that will ensure that if your mouse wanders off of the app, the entry will regain focus when the mouse re-enters the mainwindow.$mw->bind( '<Any-Enter>' => sub { $ent->Tk::focus } );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: It seems that Tk has an error in some version
by Anonymous Monk on Oct 20, 2008 at 08:56 UTC |