Geometrie-Manager pack IX

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]

pack7.pl
#!/usr/local/bin/perl -w

use Tk;
use strict;

my $top = new MainWindow;
my $frame1 = $top->Frame(-width => 50, -height => 50,
   -bg => 'red');
my $frame2 = $top->Frame(-width => 100, -height => 100,
   -bg => 'green');
my $frame3 = $top->Frame(-width => 75, -height => 75,
   -bg => 'blue');
$frame1->pack(-side => 'left', -fill => 'y');
$frame2->pack(-side => 'left', -fill => 'y');
$frame3->pack(-side => 'top', -fill => 'y', -expand => 1);
MainLoop;

*Die jeweilige fill-Option läßt sich mit -expand => 1 noch verstärken, indem auch verbleibende Hohlräume mit verkonsumiert werden können.
 

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]
Copyright © 1996, 1998, 1999, 2000 Andreas Borchert, in HTML konvertiert am 07.02.2000