How to use ?

jerry.levan at jerry.levan at
Tue May 30 01:10:11 CEST 2006


I am trying to port one of my Tcl/Tk apps to Python ( 2.4.2/3).
One task is to try to be able to use my wheel mouse to scroll a Tktable

The tcl code looks like:
  #Support the MouseWheel

    bind $ui_vars(table) <Button-4> { $ui_vars(table) yview scroll -5
units }
    bind $ui_vars(table) <Button-5> { $ui_vars(table) yview scroll +5
units }
    bind $ui_vars(code)  <Button-4> { $ui_vars(code)  yview scroll -5
units }
    bind $ui_vars(code)  <Button-5> { $ui_vars(code)  yview scroll +5
units }

$ui_vars(table) is the table and $ui_vars(code) is a text widget.

on the python side I can get scrolling in the text widget by
        # Support for mouse wheel
 self.command.bind("<Button-4>",self.command.yview_scroll(-5 ,'units'))

Unfortunately the python Tkinter Table widget does not support the
yview_scroll command.

I have tried the following:

but, alas nothing happens....

I can't find how too use, can anyone give me a clue as to how
solve my problem?



More information about the Python-list mailing list