[Urwid] [Fwd: Find focused Edit]

Ian Ward ian at excess.org
Wed Jul 20 23:53:44 EDT 2005

cantabile wrote:
 > Another idea : is it possible that wrapping the edits in 
urwid.Padding and urwid.AttrWrap stops the loop before it reaches the 
urwid.Edit itself ?

Yes, I think that is what is happening.  The Edit is within an AttrWrap, 
which is in a Padding widget.  The Padding and AttrWrap widgets keep the 
widgets they contain in members called "w".

However, this won't help you get to your help text because that is in 
your "It" class, not in the Edit widget.

I think the best thing would be to turn your It class into a widget, and 
use it directly.  You could either:
1. implement the methods shown in 
http://excess.org/urwid/reference.html#Widget_interface_definition with 
stubs that make calls to self.padd.methodname, or
2. have your It class inherit from urwid.Padding, and remove the padd 
member from your It class. (your get method could return self)
Either way once you drill down through your Columns and Padding widgets 
you will find your It object, with the help text you need.


(Sorry for the slow response, I'm at OLS this week)

More information about the Urwid mailing list