Thread Panedwindow - Seite einblenden/ausblenden (8 answers)
Opened by Gast at 2007-12-19 14:41

Spieler
 2007-12-21 01:42
#104082 #104082
User since
2007-09-24
70 Artikel
BenutzerIn
[default_avatar]
Hallo,

willst du dies:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use warnings;

use strict;

use Tk;
use Tk::HList;
#
# MainWindow
#
my $mw = MainWindow->new;
#
# Menu
#
my $m = $mw->Menu(qw/-type menubar/);
$mw->configure(-menu => $m);

my $ma = $m->cascade(-tearoff => 0, -label => '~Ansicht');

my $pr_sicht = 1;

#
# PanedWindow
#
my $panel = $mw->Panedwindow(qw/-orient horizontal/)->pack;

my $fr_left = $mw->Frame->pack;;
my $fr_right = $mw->Frame->pack;

$panel->add($fr_left, $fr_right);

my $hlist = $fr_left->HList(qw/-bg white/)
->pack(qw/-expand yes -fill both/);

my $data = $fr_right->Canvas(qw/-bg white/)
->pack;

$ma->checkbutton(
-label => 'Projekt-Explorer',
-variable => \$pr_sicht,
-command => sub {
unless( $pr_sicht ){
$panel->forget($fr_left);
}
else{
$panel->add($fr_left,-before => $fr_right);;
}

}
);

MainLoop;


Grüsse, Christoph

View full thread Panedwindow - Seite einblenden/ausblenden