[Urwid] Resizing listboxes and status of urwid
Ian Ward
ian at excess.org
Sun Mar 9 16:51:55 EDT 2008
Before your main loop you store the window size in "size" but when the
window is resized you store it in "cols, rows" but continue to use
"size" in render and draw_screen.
Ian
On Sat, 2008-03-08 at 13:47 +0000, Keith Edmunds wrote:
> size = ui.get_cols_rows()
>
> while True:
> canvas = top.render(size, focus=True)
> ui.draw_screen( size, canvas )
>
> keys = ui.get_input()
> if "q" in keys or "Q" in keys:
> break
> if "window resize" in keys:
> cols, rows = ui.get_cols_rows()
More information about the Urwid
mailing list