Re: Unbinding Tkinter default bindings for Listbox

2009-01-12 Thread Roger
On Jan 12, 5:58 pm, James Stroud wrote: > James Stroud wrote: > > tk.tk.call('bind', str(lb), '', "break") > > Which is equivalent to > > lb.bind('', "break") > > But I checked and overriding the default behavior of Listbox does not > work (tk.tk.call('bind', "Listbox", '', "break")). > > So I wou

Re: Unbinding Tkinter default bindings for Listbox

2009-01-12 Thread James Stroud
James Stroud wrote: tk.tk.call('bind', str(lb), '', "break") Which is equivalent to lb.bind('', "break") But I checked and overriding the default behavior of Listbox does not work (tk.tk.call('bind', "Listbox", '', "break")). So I would subclass Listbox and do the bindings in the __init__:

Re: Unbinding Tkinter default bindings for Listbox

2009-01-12 Thread James Stroud
Roger wrote: I'm sorry for harassing the list but any suggestions would be greatly appreciated. =) I just checked the behavior you are describing. It seems that you want to unbind the event to stop the autoscrolling when you leave the listbox. E.g.: from Tkinter import * tk = Tk() lb = Lis

Re: Unbinding Tkinter default bindings for Listbox

2009-01-12 Thread Roger
I'm sorry for harassing the list but any suggestions would be greatly appreciated. =) -- http://mail.python.org/mailman/listinfo/python-list

Re: Unbinding Tkinter default bindings for Listbox

2009-01-12 Thread Roger
On Jan 12, 6:31 am, James Stroud wrote: > James Stroud wrote: > > py> b.tk.call('bind', 'Listbox', '', _) > > You want b.tk.call('bind', 'Listbox', '', "") of course. > > James > > -- > James Stroud > UCLA-DOE Institute for Genomics and Proteomics > Box 951570 > Los Angeles, CA 90095 > > http://ww

Re: Unbinding Tkinter default bindings for Listbox

2009-01-12 Thread James Stroud
James Stroud wrote: py> b.tk.call('bind', 'Listbox', '', _) You want b.tk.call('bind', 'Listbox', '', "") of course. James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com -- http://mail.python.org/mailman/listinfo/py

Re: Unbinding Tkinter default bindings for Listbox

2009-01-12 Thread James Stroud
Roger wrote: Hi Everyone, I have a behavior associated with a default binding with Tkinter Listbox that I want to get rid of but I can't no matter if I return "break" on the binding or unbind it directly. If you have a Listbox where the bounding box is not completely revealed in the window that

Unbinding Tkinter default bindings for Listbox

2009-01-11 Thread Roger
Hi Everyone, I have a behavior associated with a default binding with Tkinter Listbox that I want to get rid of but I can't no matter if I return "break" on the binding or unbind it directly. If you have a Listbox where the bounding box is not completely revealed in the window that holds it and yo