Zucan has asked for the wisdom of the Perl Monks concerning the following question:
I am using ActivePerl 5.12.2 on Windows 7. I noticed that when I attach a scrollbar to either a listbox or a tree that the mouse wheel will allow me to scroll down the list, but not allow me to scroll up the list.
Here is a sample program using a listbox:
#!/usr/bin/perl -w use strict; use Tkx; my $mw = Tkx::widget->new("."); my $lb = $mw->new_tk__listbox(-height => 10); $lb->insert("end", 1..100); $lb->g_grid(-column => 0, -row => 0); my $sb = $mw->new_ttk__scrollbar(-orient => 'vertical', -command => [$ +lb, 'yview']); $sb->g_grid(-column => 1, -row => 0, -sticky => "ns"); $lb->configure(-yscrollcommand => [$sb, "set"]); Tkx::MainLoop();
I don't think I am doing anything wrong here, but thought I would ask the Monks for their thoughts. I find that I am now looking at binding MouseWheel events to the listbox and spending a lot more time on this than may even be necessary. Can somebody confirm the behavior with the script above?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl::Tkx Mousewheel Scrolling
by Anonymous Monk on Jan 09, 2011 at 02:10 UTC | |
by Zucan (Beadle) on Jan 09, 2011 at 02:17 UTC | |
by Anonymous Monk on Jan 09, 2011 at 02:23 UTC | |
by Anonymous Monk on Jan 09, 2011 at 02:31 UTC | |
|
Re: Perl::Tkx Mousewheel Scrolling
by Zucan (Beadle) on Jan 09, 2011 at 02:16 UTC |