6 Einträge, 1 Seite |
1
2
my $outputframe = $main->Scrolled('Text')->pack(-side => 'left', -expand => 1, -fill => 'both');
tie (*OUTPUT, 'Tk::Text',$outputframe);
$outputframe->delete(0,'End');
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::TextUndo;
my $mw = MainWindow->new();
my $sc = $mw->Scrolled('Text',
-height => '1',
-width => '10',
-scrollbars => 'osoe',
)->pack();
$mw->Button(-text => 'del',-command => \&deleter)->pack();
$sc->insert('end','Test');
MainLoop;
sub deleter{
$sc->delete('1.0','end');
}
6 Einträge, 1 Seite |