in reply to Re: TK Listbox: scrolling with keys/mousewheel
in thread TK Listbox: scrolling with keys/mousewheel

Thanks! That set me on the right track!

A mixture between 1186926 and the sub wheel_browse from 1186662 works for me

Rata

sub selectProjectDialog_newtest { $mw = shift; # store the main window my @project_choices = split(" ","Project1 Project2 Project3 Proje +ct4 Project11 Project12 Project13 Project14 ") ; my $projectSelection_tl= $mw->Toplevel( ); $projectSelection_tl->title("Select the project:"); $projectSelection_tl->Label(-text => 'Select the project Id:', + )->grid(-row => 5, -column => 10, -sticky => "w"); my $scrolled1 = $projectSelection_tl->Scrolled ("Listbox", -scrollbars => "se", -width => 50, -height => 4, -selectmode => "extended") ->grid(-row => 10, -column => 10, -columns +pan => 10, -rowspan => 10); $scrolled1->insert ("end", @project_choices); $scrolled1->Subwidget('listbox')->bind('<Enter>', sub{$scrolled1-> +Subwidget('listbox')->focus()}); $scrolled1->Subwidget('listbox')->bind('<MouseWheel>',[ \&wheel_br +owse, $scrolled1, Tk::Ev('D')]); }