Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: TK Listbox: scrolling with keys/mousewheel

by Ratazong (Monsignor)
on Aug 04, 2020 at 09:59 UTC ( [id://11120281]=note: print w/replies, xml ) Need Help??


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')]); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120281]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-16 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found