#!/usr/bin/perl use Tk; use strict; my $m=Tk::MainWindow->new(); # create a big label so that the window is large # enough to demonstrate this my $label=$m->Label(-bd => 5, -relief => "ridge", -text => "Label Text Here\n" x 10)->pack(); # # bind Leave events from the label to # generate a useless virtual # event. # (We don't really need to fire an event # , we just need the warp option) # Without the -x/-y options, it warps # the pointer to the nw corner of the widget # $label->bind('', sub { my($w)=shift; $w->eventGenerate('<>', -warp => 1); } ); MainLoop;