|< 1 2 3 >| | 24 entries, 3 pages |
QuoteMit der -bitmap oder -image-Option von Tk::Dialog.@ptk: Danke, das hab ich noch garnicht bemerkt ...
Ich habe es mir mal angesehen, und habe eine Frage, ich bräuchte die icons von MessageBox aber in einem Dialog, da ich bis zu 6 Buttons angeben können muss.
Weiß du wie das gehen könnte ?
1
2
3
my $frame1 = $parent->Frame()->pack(-side => 'left', -fill => 'y');
my $frame2 = $parent->Frame()->pack(-side => 'top', -fill => 'both');
my $frame3 = $parent->Frame()->pack(-side => 'top', -fill => 'both');
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
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
tk_main();
MainLoop();
exit;
sub tk_main {
my $mw = MainWindow->new();
$mw->title('Pack Layout 1');
# |------------------------------------------------|
# | Frame 1 |
# |------------------------------------------------|
# | Frame 2 | Frame 3 |
# | |------------------------------|
# | | Frame 4 |
# |------------------------------------------------|
my $frame1 = $mw->Frame(
-borderwidth => 5,
-background => 'blue',
)->pack(
-side => 'top',
-expand => 1,
-fill => 'both',
);
my $frame2 = $mw->Frame(
-borderwidth => 5,
-background => 'green',
)->pack(
-side => 'left',
-expand => 1,
-fill => 'both',
);
my $f_tmp = $mw->Frame(
-borderwidth => 5,
-background => 'red',
)->pack(
-side => 'left',
-expand => 1,
-fill => 'both',
);
my $frame3 = $f_tmp->Frame(
-borderwidth => 5,
-background => 'orange',
)->pack(
-side => 'top',
-expand => 1,
-fill => 'both',
);
my $frame4 = $f_tmp->Frame(
-borderwidth => 5,
-background => 'magenta',
)->pack(
-side => 'top',
-expand => 1,
-fill => 'both',
);
$frame1->Label(-text => 'Label 1')->pack();
$frame2->Label(-text => 'Label 2')->pack();
$frame3->Label(-text => 'Label 3')->pack();
$frame4->Label(-text => 'Label 4')->pack();
}
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
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
tk_main();
MainLoop();
exit;
sub tk_main {
my $mw = MainWindow->new();
$mw->title('Pack Layout 1');
# |------------------------------------------------|
# | Frame 1 |
# |------------------------------------------------|
# | Frame 2 | Frame 3 |
# | |------------------------------|
# | | Frame 4 |
# |------------------------------------------------|
my $frame1 = $mw->Frame(
-borderwidth => 5,
-background => 'blue',
)->pack(
-side => 'top',
-expand => 1,
-fill => 'both',
);
my $frame2 = $mw->Frame(
-borderwidth => 5,
-background => 'green',
)->pack(
-side => 'left',
-expand => 1,
-fill => 'both',
);
my $frame3 = $mw->Frame(
-borderwidth => 5,
-background => 'orange',
)->pack(
-side => 'top',
-expand => 1,
-fill => 'both',
);
my $frame4 = $mw->Frame(
-borderwidth => 5,
-background => 'magenta',
)->pack(
-side => 'top',
-expand => 1,
-fill => 'both',
);
$frame1->Label(-text => 'Label 1')->pack();
$frame2->Label(-text => 'Label 2')->pack();
$frame3->Label(-text => 'Label 3')->pack();
$frame4->Label(-text => 'Label 4')->pack();
}
|< 1 2 3 >| | 24 entries, 3 pages |