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

renee
 2007-12-19 14:50
#104032 #104032
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code (perl): (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
#!/usr/bin/perl

use strict;

use Tk;
#
# 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(qw/-height 100 -width 100/)->pack;;
my $fr_right = $mw->Frame(qw/-height 100 -width 100/)->pack;

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

$ma->checkbutton(
        -label => 'Projekt-Explorer',
        -variable => \$pr_sicht,
        -command => sub {
                unless( $pr_sicht ){
                   $panel->packForget;
                }
                else{
                   $panel->pack;
                }
        }
);

MainLoop;
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Panedwindow - Seite einblenden/ausblenden