![]() |
![]() |
10 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = tkinit; my $output = qx{perl programm.pl}; my $text = $mw->Text->pack; $text->insert( 'end', $output ); MainLoop;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $mw = tkinit();
$mw->Button(
-text => 'Drück mich!',
-command => sub{
print "ausgabe\n";
warn "warnung\n";
},
)->pack();
$mw->MainLoop();
1
2
3
4
5
6
7
8
9
10
11
use Tk;
use strict;
my $mw = MainWindow->new;
my $text = $mw->Text(qw/-width 40 -height 10/)->pack;
tie *STDOUT, ref $text, $text;
print "Hello Text World!\n";
MainLoop;
Spieler+2007-11-07 15:17:23--Hallo,
falls du so etwas meinst:
aus perldoc Tk::Text :
Code: (dl )1
2
3
4
5
6
7
8
9
10
11use Tk;
use strict;
my $mw = MainWindow->new;
my $text = $mw->Text(qw/-width 40 -height 10/)->pack;
tie *STDOUT, ref $text, $text;
print "Hello Text World!\n";
MainLoop;
![]() |
![]() |
10 Einträge, 1 Seite |