Thread Subs für Reiterwechsel (10 answers)
Opened by J-jayz-Z at 2005-07-18 22:57

esskar
 2005-07-19 02:10
#44185 #44185
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl
use strict;
use warnings;

use Tk;
use Tk::NoteBook;

my $main = MainWindow->new();
my $note = $main->NoteBook()->pack();

my $page1 = $note->add(
'Notebook-1',
-label => 'ReiterEins'
);


my $page2 = $note->add(
'Notebook-2',
-label => 'ReiterZwei',
-raisecmd => \&test
);

my $text = '';
my $label = $page2->Label(-textvariable => \$text)->pack();

my $entry = $page1->Entry()->pack();
$entry->focus();

MainLoop();

sub test {
$text = $entry->get();
$entry->delete('0.0','end');
}


du hattest immer ein neues label angelegt!

View full thread Subs für Reiterwechsel