[Urwid][Fwd: Find focused Edit]

cantabile cantabile.03 at wanadoo.fr
Sun Jul 31 03:26:00 EDT 2005


ian at excess.org a écrit :

>Try this instead:
>
>            while not keys:
>                keys= self.ui.get_input()
>                for k in keys:
>                    if k == 'window resize':
>                        size = self.ui.get_cols_rows()
>                    elif k == 'f5':
>                            self.update(self.makeDict())
>                            return
>                    elif k== 'f8':
>                        return
>                    else:
>                        self.view.keypress(size, k)
>	
>            w, pos = self.listbox.get_focus()
>            while hasattr(w, 'get_focus'):
>                w = w.get_focus()
>                if w.__class__.__name__ == 'It':
>                    HELP.settext(w.gethelp())
>
Works like a charm !
Nice.
Many thanks for your help :)




More information about the Urwid mailing list