3 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
#!/usr/bin/perl
use Tk;
my $mw = new MainWindow;
my $fl = $mw->Frame(-background=> 'blue', -width=>"500", -height=>"500") ->pack(qw/ -side left -anchor nw/);
my $index = 0;
my $l1 = $fl->Label(-text=>'Index', -width=>6, -relief =>'raised')
->grid(-column=> 0,
-row=> 0);
my $l2 = $fl->Label(-text=>'X1', -width=>13, -relief =>'raised')
->grid(-column=> 1,
-row =>0);
my $l3 = $fl->Label(-text=>'Y1', -width=>13, -relief =>'raised')
->grid(-column=> 2,
-row =>0);
my $l4 = $fl->Label(-text=>'X2', -width=>13, -relief =>'raised')
->grid(-column=> 3,
-row =>0);
my $l5 = $fl->Label(-text=>'Y2', -width=>13, -relief =>'raised')
->grid(-column=>4,
-row =>0);
my $indexlist = $fl->Listbox( -width =>6, -height => 30)
->grid(
-column=> 0,
-row=> 1);
$indexlist->insert("end", "$index");
my $x1list = $fl->Listbox( -width =>13, -height => 30)
->grid(
-column=> 1,
-row=> 1);
$x1list->insert("end", "$index");
my $y1list = $fl->Listbox(-width =>13, -height => 30)
->grid(
-column=> 2,
-row=> 1);
$y1list->insert("end", "$index");
my $x2list = $fl->Listbox(-width =>13, -height => 30)
->grid(
-column=> 3,
-row=> 1);
$x2list->insert("end", "$index");
my $y2list = $fl->Listbox(-width =>13, -height => 30)
->grid(
-column=> 4,
-row=> 1);
$y2list->insert("end", "$index");
MainLoop;
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 62 63 64 65 66 67 68 69 70 71 72 73 74
use strict; use warnings; use Tk; my $mw = new MainWindow; my $fl = $mw->Frame(-background=> 'blue', -width=>"500", -height=>"500") ->pack(qw/ -side left -anchor nw -expand 1 -fill both /); my $index = 0; my @go = (-sticky => 'ew'); my $l1 = $fl->Label(-text=>'Index', -width=>6, -relief =>'raised') ->grid(-column=> 0, -row=> 0, @go, ); my $l2 = $fl->Label(-text=>'X1', -width=>13, -relief =>'raised') ->grid(-column=> 1, -row =>0, @go,); my $l3 = $fl->Label(-text=>'Y1', -width=>13, -relief =>'raised') ->grid(-column=> 2, -row =>0, @go,); my $l4 = $fl->Label(-text=>'X2', -width=>13, -relief =>'raised') ->grid(-column=> 3, -row =>0, @go); my $l5 = $fl->Label(-text=>'Y2', -width=>13, -relief =>'raised') ->grid(-column=>4, -row =>0, @go,); my $indexlist = $fl->Listbox( -width =>6, -height => 30) ->grid( -column=> 0, -row=> 1, @go,); $indexlist->insert("end", "$index"); my $x1list = $fl->Listbox( -width =>13, -height => 30) ->grid( -column=> 1, -row=> 1, @go,); $x1list->insert("end", "$index"); my $y1list = $fl->Listbox(-width =>13, -height => 30) ->grid( -column=> 2, -row=> 1, @go,); $y1list->insert("end", "$index"); my $x2list = $fl->Listbox(-width =>13, -height => 30) ->grid( -column=> 3, -row=> 1, @go,); $x2list->insert("end", "$index"); my $y2list = $fl->Listbox(-width =>13, -height => 30) ->grid( -column=> 4, -row=> 1, @go,); $y2list->insert("end", "$index"); $fl->gridColumnconfigure($_, -weight => 1) for (0..4); MainLoop;
3 Einträge, 1 Seite |