in reply to Re^2: Perl Tk Scrolled widget callbacks
in thread Perl Tk Scrolled widget callbacks
Another option is to bind mouse button 3 ( right click ) to the $mw to do your change. Supressing the Text menu is up to you.my $txt = $mw->Text()->pack(-side => 'top'); #to my $txt = $mw->Scrolled('Text')->pack(-side => 'top');
#!/usr/bin/perl use Tk; my $mw = MainWindow->new; my $txt = $mw->Scrolled('Text')->pack(-side => 'top'); $mw->bind('<Button-3>', sub { print "main control 3 \n" }); MainLoop;
|
|---|