Debian Codegraph @

Compound/compound_demo

raw
1 #!/usr/local/bin/perl -w
2 use Tk;
3 use Tk::Compound;
4 my $mw = MainWindow->new;
5 my $b = $mw->Button(-command => [destroy => $mw])->pack;
6 my $i = $b->Compound;
7 $i->Line;
8 $i->Text(-text => 'Line');
9 $i->Space(-width => '3m');
10 $i->Text(-text => 'one');
11 $i->Line;
12 $i->Bitmap(-bitmap => 'warning');
13 $i->Line;
14 $i->Text(-text => 'Line2');
15 $b->configure(-image => $i);
16
17 my $b2 = $mw->Button(-command => [destroy => $mw], -image => $i)->pack;
18
19 MainLoop;