Rather than trying to enable / disable focusFollowsMouse, you may be better off putting in a small "autofocus" procedure and only bind it to the widgets you want. Something like this: (probably buggy but should give the the idea)
#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = MainWindow->new; my $entry = $mw->Entry()->pack; my $entry1 = $mw->Entry()->pack; my $entry2 = $mw->Entry()->pack; autofocus($_) for ($entry, $entry1, $entry2); sub autofocus { my $widget = shift; $widget->bind( '<Enter>' => sub{ $widget->focus } ); } MainLoop;
In reply to Re: Tk - Focus & Mouse - On & Off
by thundergnat
in thread Tk - Focus & Mouse - On & Off
by merrymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |