Leser: 2
6 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
$button1 = $mw->Button( -text => "Zeile1\nZeile2",
-relief => "raised",
-font => "{Arial} 24 {bold}",
-background => "#FFFF00",
-activebackground => "#FFFF00",
-command => sub { }
)->place( -x => 55, -y => 50, -height => 100, -width => 200);
1
2
3
4
5
6
7
8
9
10
11
$beschriftung = "Zeile1\nZeile2";
$button1 = $mw->Button( -text => $beschriftung,
-relief => "raised",
-font => "{Arial} 24 {bold}",
-background => "#FFFF00",
-activebackground => "#FFFF00",
-command => sub { }
)->place( -x => 55, -y => 50, -height => 100, -width => 200);
1
2
3
4
5
6
7
use IniConf;
sub readini
{
my $cfg = IniConf->new( -file => $_[2] );
my $value = $cfg->val($_[0], $_[1]);
return $value;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
$button1 = $mw->Button( -text => readini(NAMEN, NAME1, 'text.ini'),
-relief => "raised",
-font => readini(SCHRIFT, FONT, 'text.ini'),
-background => "#FFFF00",
-activebackground => "#FFFF00",
-command => sub { &print; }
}
)->place( -x => 55, -y => 50, -height => 100, -width => 200);
1
2
3
4
5
6
7
8
9
10
11
12
13
$button1 = $mw->Button( -text => readini(NAMEN, NAME1, 'text.ini'),
-relief => "raised",
-font => readini(SCHRIFT, FONT, 'text.ini'),
-background => "#FFFF00",
-activebackground => "#FFFF00",
-command => sub { &print; }
}
)->place( -x => 55, -y => 50, -height => 100, -width => 200);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(my $text = readini(NAMEN, NAME1, 'text.ini')) =~ s/\\n/\n/g;
$button1 = $mw->Button( -text => $text,
-relief => "raised",
-font => readini(SCHRIFT, FONT, 'text.ini'),
-background => "#FFFF00",
-activebackground => "#FFFF00",
-command => sub { &print; }
}
)->place( -x => 55, -y => 50, -height => 100, -width => 200);
6 Einträge, 1 Seite |