Leser: 1
![]() |
|< 1 2 >| | ![]() |
14 Einträge, 2 Seiten |
QuoteUnlike the standard Tcl/Tk's wish, perl/Tk allows you to create several MainWindows.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use Tk;
{
package Tk::MyLabel;
use base qw(Tk::Derived Tk::Label);
Construct Tk::Widget 'MyLabel';
our $photo;
sub Populate {
my($w, $args) = @_;
$photo ||= $w->Photo(-file => Tk->findINC("Xcamel.gif"));
$args->{-image} = $photo;
}
}
my $mw = tkinit;
$mw->MyLabel->pack;
$mw->MyLabel->pack;
MainLoop;
![]() |
|< 1 2 >| | ![]() |
14 Einträge, 2 Seiten |