7 Einträge, 1 Seite |
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
52
53
54
55
56
57
58
59
60
61
#! /usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::Tree;
use Tk::Label;
my $top = new MainWindow( -title => "OSS NETWORK");
my $label = $top->Label(-width=>15);
my $tree = $top->Scrolled( 'Tree',
-separator => '/',
-background => 'white',
-foreground => 'blue',
-relief => 'groove',
-exportselection => 1,
-scrollbars => 'oe',
-height => 20,
-width => 40,
-itemtype => 'text',
-selectmode => 'extended',
-browsecmd => sub {
my $DN = shift;
$label->configure(-text=>$DN);
}
);
# Pack the tree.
$tree->pack( -expand => 'yes',
-fill => 'both',
-padx => 15,
-pady => 15,
-side => 'top' );
$label->pack( -expand => 'yes',
-fill => 'both',
-padx => 15,
-pady => 15,
-side => 'top' );
# Pack the label.
my @list = qw( PLMN-PLMN PLMN-PLMN/BSC-49567 PLMN-PLMN/BSC-49566 PLMN-PLMN/BSC-49560 PLMN-PLMN/BSC-49567/BCF-1 PLMN-PLMN/BSC-49567/BCF-5 PLMN-PLMN/BSC-49567/BCF-5/BTS-7 PLMN-PLMN/BSC-49567/BCF-2 PLMN-PLMN/BSC-49567/BCF-1/BTS-A);
foreach ( '/', @list ) {
my $text = (split( /\//, $_ ))[-1];
#If we're on /, let's make its label blank.
#
if ($_ eq '/') {
$text = "";
}
# Add the item (in $_) with $text as the label.
#
$tree->add( $_, -text => $text );
}
$tree->autosetmode();
MainLoop();
while (($cake_no, $cdid,$mid, $title, $imdb) = $Config{sth}->fetchrow) {
7 Einträge, 1 Seite |