|< 1 2 >| | 11 Einträge, 2 Seiten |
1
2
3
4
sub get {
$page2->Label(-text => $entry->get())->pack() if($entry->get());
$entry->delete('0.0','end');
}
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
#!/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 $entry = $page1->Entry()->pack();
$entry->focus();
MainLoop();
sub test {
my $text = $entry->get();
$page2->Label(-textvariable => \$text)->pack() if($text);
$entry->delete('0.0','end');
}
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');
}
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
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::NoteBook;
my $main = MainWindow->new();
my $note = $main->NoteBook()->pack();
my $text = '';
my $page1 = $note->add('Notebook-1', -label => 'ReiterEins');
my $page2 = $note->add('Notebook-2', -label => 'ReiterZwei', -raisecmd => \&test);
my $entry = $page1->Entry()->pack();
$page2->Label(-textvariable => \$text)->pack();
$entry->focus();
MainLoop();
sub test {
$text = $entry->get();
$entry->delete('0.0','end');
}
|< 1 2 >| | 11 Einträge, 2 Seiten |