7 Einträge, 1 Seite |
1 2 3
my $text_data = $combi_window->Text( -height => 8, width => 122 ); my $be_add = $combi_window->JBrowseEntry( -state => 'readonly', -variable => \$headline, -choices => \@headlines, -width => 20); $be_add->configure( -browsecmd => sub { $text_data->Insert( "$start_data$headline$end_data"); $text_data->focus; } );
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use warnings;
use Tk;
require Tk::JBrowseEntry;
my $mw = MainWindow->new;
my @headlines = qw/foo bar baz/;
my $headline;
my $text_data = $mw->Text( -height => 8,
-width => 122 )->pack;
my $be_add = $mw->JBrowseEntry( -state => 'readonly',
-variable => \$headline,
-choices => \@headlines,
-width => 20)->pack;
$be_add->configure( -browsecmd =>
sub { $text_data->insert('end',
"start $headline end_data\n");
$text_data->afterIdle([$text_data,'focus']);
} );
MainLoop;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use warnings;
use Tk;
require Tk::JBrowseEntry;
my $mw = MainWindow->new;
my @headlines = qw/foo bar baz/;
my $headline;
my $text_data = $mw->Text( -height => 8,
-width => 122 )->pack;
my $be_add = $mw->JBrowseEntry( -state => 'readonly',
-variable => \$headline,
-choices => \@headlines,
-width => 20)->pack;
$be_add->configure( -browsecmd =>
sub { $text_data->insert('end',
"start $headline end_data\n");
$text_data->afterIdle([$text_data,'focus']);
} );
MainLoop;
7 Einträge, 1 Seite |