#!/usr/bin/perl use warnings; use strict; use Tk; require Tk::TextUndo; # a in the TextUndo widget produces # nothing in the Text area, and a foo to the console my $mw = tkinit; # create a top bar for testing pure $mw focus my $button = $mw->Button(-text=>'test')->pack(); $mw->bind('', sub { print "main control s \n" }); my $t = $mw->Scrolled ('TextUndo')->pack; my $t1 = $t->Subwidget("scrolled"); # get real widget $t1->bind('', sub { print "\t\tfoo\n"; $_[0]->break }); $t1->bindtags([($t1->bindtags)[1,0,2,3]]); MainLoop;