Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: perl Tk::Scrolled : how do I hijack existing subwidget bindings?

by zentara (Archbishop)
on Apr 04, 2005 at 16:07 UTC ( [id://444728]=note: print w/replies, xml ) Need Help??


in reply to Re^2: perl Tk::Scrolled : how do I hijack existing subwidget bindings?
in thread perl Tk::Scrolled : how do I hijack existing subwidget bindings?

Hi again, I looked at your code, and your problem with the up and down arrow buttons being bound, can be solved by putting $text->focus. That will make the up down arrows work right away.
$text->focus MainLoop;

The mouse scroll wheel can be made to work with:

$text->bind('<MouseWheel>' => [ sub { $_[0]->yview('scroll', -($_[1] / 120) * 3, 'units') }, Ev('D') ]);
I got that from googling the archives of comp.lang.perl.tk for "mouse scroll". But I don't have a scroll mouse, nor Windows to say if it works there.

I'm not really a human, but I play one on earth. flash japh

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-19 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found