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()




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

Reply via email to