PyGUI - Couple of questions - TextField callbacks and drop down list....
greg at cosc.canterbury.ac.nz
Tue Oct 21 03:46:19 CEST 2008
> TextField callbacks... I want to be able to generate a callback when a
> textfield is modified. It doesn't appear to have an "action" member...
I haven't got around to adding any actions to text fields
In the meantime, you could put a key_down method on the
containing window that catches the Return or Enter key.
> Is there anything I can do here? Or should I maybe subclass the
> TextField class.....
Unfortunately that's not easy to do at the moment. Due to
disparities in the way events are handled by the underlying
toolkits, PyGUI doesn't promise to let you intercept events
on the built-in control types by overriding methods.
I really need to rethink the whole event handling stragegy,
as it's rather a mess at the moment.
> Drop-down lists...
That's another thing for the future. If you're feeling
adventurous, you could have a go at rolling your own based
on a View.
Anyway, glad you're finding it useful. Feel free to ask if
you have any more questions.
More information about the Python-list