================================= use strict; use warnings; use Tk; my $mw = MainWindow->new(); my $lbox = $mw->Listbox()->pack(); my @list = ( "a", "b", "c", "d", "e", "f" ); $lbox->insert('end', @list ); $lbox->selectionSet('2'); #default starting selection in the box,"c" $lbox->bind('<>', sub{warn "new ListBox element selected!\n"} ); MainLoop;