Leser: 1
![]() |
![]() |
5 Einträge, 1 Seite |
$toplevel = $mainwindow->Toplevel
$toplevel->destroy
$toplevel->destroy if Tk::Exists($toplevel)
1 2
$widget = $toplevel->Label(...)->pack; $widget_drueber = $widget->Label(...)->place(-x => 0, -y => 0, -relwidth => 1, -relheight => 1);
$fd = $mw->Frame()->pack(-side=>"left");
$fd ->packforget();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use Tk;
$mw = MainWindow->new;
$l = $mw->Label(-text => "Test")->pack;
$f = $l->Frame;
$b = $mw->Button(-text => "Toggle visibility",
-command => sub {
if ($f->manager) {
$f->placeForget;
} else {
$f->place(-x => 0, -y => 0,
-relwidth => 1,
-relheight => 1,
)
}
})->pack;
MainLoop;
![]() |
![]() |
5 Einträge, 1 Seite |