in reply to Tk DialogBox Question
#!/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 <Return> $dlg->bind('<Return>', ''); print "Button pressed: ", $dlg->Show(), "\n";
Update: Further explaination: A Tk::DialogBox is just a widget (a composite widget, but still just a widget), so you can call any standard widget methods on it, such as configure or bind. The docs for bind say that if you give an empty string for your callback, it destroys the current binding for that sequence.
bbfu
Black flowers blossom
Fearless on my breath
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Tk DialogBox Question
by fletcher_the_dog (Friar) on Aug 29, 2003 at 20:47 UTC | |
|
Re: Re: Tk DialogBox Question
by sweetblood (Prior) on Aug 29, 2003 at 17:52 UTC |