Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

tablelist and mousewheel bindings

Hi all,

i tried to use tablelist with the tklib style package, specifically the
as style, which provides mousewheel bindings. (on windows XP specifically)

Sadly it does not work as expected, probably because the wrong
subcomponent of the tablelist gets the mousewheel events.

I see the text widget component scrolling when using the mousewheel, but
the scrollbars attached to the tablelist don't react to that scrolling.

Sometimes i even see trash in the text widget, when scrolling with the

So is there any simple to use recipe for adding mousewheel bindings to a


Michael Schlenker schrieb:

Tablelist comes with built-in mousewheel support.  It works exactly like
in the case of the Tk listbox.  This means, among others, that on
Windows the widget will only react to <MouseWheel> events if it has the
focus.  The easiest way to achieve this is to configure your tablelist
widget with the -setfocus option, which makes sure that a left mouse
click will set the focus to the tablelist widget's body.

I have never tried the tklib style package, and, unfortunately, right
now I have no time for examining it.  But, judged by a first look, I
think that its only significant improvement regarding the mouse wheel
support is that it automatically sets the focus to the widget.  As
already said, you can make sure that this is done by a left mouse click,
after which the built-in mouse wheel binding script will produce the
expected behavior.

Csaba Nemethi   http://www.nemethi.de   mailto:csaba.neme@t-online.de

Actually the significant improvement is that it removes the MouseWheel
handling from all other widgets.  This may need special overriding in
the case of megawidgets like tablelist.  However, if you do use such
overrides, you should make sure that your MouseWheel bindings uses 'break'.


Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc