[Urwid] multi-screen app ?

Ian Ward ian at excess.org
Sat Jul 30 11:07:33 EDT 2005


cantabile wrote:

> Hi,
> I'd like to extend the program I'm writing to a multi screen 
> interface, wizard-like.
> So far, I know how to draw screen but not how to clear it.
> What would be the best way to get that kind of app (say : we change 
> wizard page when user inputs F2, for example) ?
>
> Thanks.

To switch between different screens you can render a different top-level 
widget depending on which screen you want to display and pass that 
canvas to draw_screen(..).

If you want to have different screens that share the same top level 
Frame widget then you can change its body widget like this:
my_top_frame.body = some_other_body
where some_other_body is a listbox or other box widget.  Then when you 
render the top Frame widget its contents will have changed.

Ian




More information about the Urwid mailing list