#!/usr/bin/winperl use warnings; use strict; use Tk; use Tk::DialogBox; my $dlg = MainWindow->new()->DialogBox( -title => 'Test', -buttons => [qw/Ok Cancel/], ); $dlg->Entry()->pack->focus(); # Destroy the current binding for $dlg->bind('', ''); print "Button pressed: ", $dlg->Show(), "\n";