Tkinter events - how to make a "change" event?
gregm at iname.com
Mon Mar 6 14:13:38 CET 2000
It looks like you may be doing this:
when you probably should be doing this:
The former puts the binding on the megawidget's hull component (the
But you really should be using the modifiedcommand option of the
combobox's entry component:
combobox = Pmw.ComboBox(...
entry_modifiedcommand = myCallbackFunction,
>From the Pmw.EntryField manual page:
This is called whenever the contents of the entry has been
changed due to user action or by a call to setentry().
On 1 Mar, Thomas Lane wrote:
> I'm using a Pmw.ComboBox and I want to handle a "change" event for the
> text field. First of all, callbacks bound to a Pmw.ComboBox don't seem
> to work. I can bind them, but the functions never get called. Does
> anyone know why? Second, from what I've read, it looks like Tkinter only
> supports mouse and keyboard events, so there is no such thing as a
> "change" event. What is the best way to implement something like this?
> Should I just catch every mouse and keyboard event for the object and
> check for a change every time? Any help would be appreciated.
> tom at parlant.com
Greg McFarlane INMS Telstra Australia gregm at iname.com
More information about the Python-list