Leser: 4
![]() |
![]() |
6 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
my $dialog;
$dialog=$mw->Dialog(-title=> "Mein Dialog",
-bitmap=> 'warning',
-buttons=>["Yes","No"],
-width=>60,
-height=>20,
-font=>'Helvetica 12');
my $text="ein seeeeeeeeeeeeeeeeeeeeeeeeeeeeeehr langer Text";
$dialog->configure(-text=>"$text");
$dialog->Show();
QuoteName: wrapLength
Class: WrapLength
Switch: -wraplength
For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::Dialog;
my $mw = tkinit();
my $dialog;
$dialog=$mw->Dialog(-title=> "Mein Dialog",
-bitmap=> 'warning',
-buttons=>["Yes","No"],
-width=>100,
-height=>20,
-font=>'Helvetica 12');
my $text="ein seeeeeeeeeeeeeeeeeeeeeeeeeeeeeehr langer Text und noch viele zeichen mehr";
$dialog->configure(-text=>"$text");
$dialog->configure(-wraplength => 0);
$dialog->Show();
MainLoop;
![]() |
![]() |
6 Einträge, 1 Seite |