[Urwid] detecting when an edit box has changed

Ian Ward ian at excess.org
Fri Jul 7 23:36:09 EDT 2006


Eric S. Johansson wrote:

> is there any way to detect when an edit box has changed short of 
> comparing against some "original" data source?

You can hook its keypress() function and check if it returned None 
(which means that the key was handled by the edit widget. To do that you 
can either subclass the Edit widget or the WidgetWrap class to define 
your own keypress function.

HTH,
Ian





More information about the Urwid mailing list