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;