Debian Codegraph @

examples/tixwm_demo

raw
1 #!/usr/local/bin/perl -w
2
3 # XXX Does not work anymore:
4 # "can't pack ".dialog": it's a top-level window"
5
6 use Tk;
7 use Tk::Dialog;
8 my $mw = MainWindow->new;
9
10 my $b = $mw->Button(-text => 'A button', -command => sub { print "A button\n"});
11 my $t = $mw->Dialog(-title => 'A Dialog', -text => 'A dialog has text');
12 $t->withdraw;
13 $t->idletasks;
14 $t->wmCapture;
15 $t->pack;
16 $b->wmRelease;
17 MainLoop;