Hello Antonio!

Antonio Cavallo wrote:
> Hi,
> I'm creating a menu based system with urwid.

Did you look at the "dialog.py" example?  It creates simple menus like 
the dialog (1) unix command.

> 
> Each page is going to have a header, a footer and
> the main body: this has been done using a frame.
> 
> In the body I'd like to put a single
> column of buttons vertically stacked and centered.
> 
> Is this possible? What's the best way? I've put something like this
> in the frame's body (but it doesn't work):
> 
> view = urwid.Frame(page, header=header, footer=footer, focus_part='body')
> buttons = []
> buttons.append(urwid.AttrWrap(urwid.Button("A", pressed), 's0', 's1'))
> buttons.append(urwid.AttrWrap(urwid.Button("B", pressed), 's0', 's1'))
> 
> items = urwid.SimpleListWalker(buttons)
> listbox = urwid.ListBox(items)
> padding = urwid.Padding(listbox, "center", 20)
> view.set_body(self.padding)
> 
> It seems stuck and no interaction seems working.
> Thank you in advance,
> Antonio Cavallo

If you could post a small example to the list it would be easier to see 
where the problem lies.

Ian


_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to