[Urwid] Correct way for listbox and columns

Ian Ward ian at excess.org
Fri Nov 28 10:43:35 EST 2008


Friedrich Weber wrote:
> Hi,
> 
> I am wondering what's the correct way to have a ListBox in a Columns and this
> Columns widget in a Pile widget. Currently I have the problem that I don't know
> how I should do that (basically "How to have a box widget inside a flow widget").
> 
> I was trying to set box_columns=[<number of the listbox>] in the columns, but it
> seems like the listbox is rendered with 'infinite' height. If I use a
> BoxAdapter, I don't know which height to set (I would like the listbox to grow
> or shrink when the window size is modified).
> 
> I can put together some example code if needed, but maybe you have a short
> pointer for me? ;-)

You might want the Frame widget to wrap the ListBox instead of the Pile. 
  Frame widgets can contain one box widget.

The Pile widget will eventually be general enough to use instead of the 
Frame (with any number of box or flow widgets) but I believe that it 
doesn't work yet.

Send some code if this doesn't answer your question.

Ian




More information about the Urwid mailing list