you want focus(). Here is an example:
use strict; use warnings; use Tk; my $mw = tkinit; my @e = map {$mw->Entry->pack} (0..4); my $b = $mw->Button(-text => 'clear', -command => sub{for (@e){$_->delete(0,'end')} $e[0]->focus; })->pack; MainLoop;
In reply to Re: How to change cursor position
by lamprecht
in thread How to change cursor position
by ch123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |