Discussion:
[Urwid] Urwid Graph Script Example Question for the l list that uses SimpleListWalker
d hee
2013-11-17 19:10:44 UTC
Permalink
?I am studying the example script for graphs. How come the Pile widget wasn't used for this function?


273?
274 ? ? ? ? l = [ ? ?urwid.Text("Mode",align="center"),
275 ? ? ? ? ? ? ] + self.mode_buttons + [
276 ? ? ? ? ? ? urwid.Divider(),
277 ? ? ? ? ? ? urwid.Text("Animation",align="center"),
278 ? ? ? ? ? ? animate_controls,
279 ? ? ? ? ? ? self.animate_progress_wrap,
280 ? ? ? ? ? ? urwid.Divider(),
281 ? ? ? ? ? ? urwid.LineBox( unicode_checkbox ),
282 ? ? ? ? ? ? urwid.Divider(),
283 ? ? ? ? ? ? self.button("Quit", self.exit_program ),
284 ? ? ? ? ? ? ]
285 ? ? ? ? w = urwid.ListBox(urwid.SimpleListWalker(l))
286 ? ? ? ? return w
287 ? ??


?I ask this??because ?it looks like to me it's a collection of widgets stacked up on top of each other
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.excess.org/pipermail/urwid/attachments/20131117/66153c28/attachment.htm
Ian Ward
2013-11-18 13:57:02 UTC
Permalink
Post by d hee
I am studying the example script for graphs. How come the Pile widget
wasn't used for this function?
...
Post by d hee
I ask this because it looks like to me it's a collection of widgets
stacked up on top of each other
You're right, both Pile and ListBox stack widgets vertically. The
reason most examples use ListBox is that ListBox will let you scroll
through the widgets with up/down/page up/page down when they don't all
fit on the screen.

Ian

Loading...