Thread Tk::Entry -> configure: Wert leer -> kein Effekt (3 answers)
Opened by GoodFella at 2007-06-11 17:55

GoodFella
 2007-06-11 17:55
#46452 #46452
User since
2007-01-09
192 Artikel
BenutzerIn
[default_avatar]
Wenn ich versuche, das -text-Attribut eines Entry-Widgets zu leeren, indem ich einfach '' übergebe, hat das komischerweise keinen Effekt. Hier mein TestScript:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
use Tk;
use strict;
use warnings;

my $main = MainWindow->new;

my $entry = $main->Entry( -text => 'bla' ) -> pack();
$main->Button( -text => 'leer', -command => sub { $entry->configure( -text => '' ); } ) -> pack();
$main->Button( -text => 'nicht leer', -command => sub { $entry->configure( -text => 'nicht leer' ); } ) -> pack();
MainLoop;


Weiss jemand wieso?

View full thread Tk::Entry -> configure: Wert leer -> kein Effekt