[Urwid] ListBox Won't Scroll Using Keys

Greg Hamilton gregh at object-craft.com.au
Mon Sep 11 19:38:09 EDT 2006


Your run() function only handles mouse and resize events. Try something 
like this:

     for k in keys:
         if urwid.is_mouse_event(k):
             event, button, col, row = k
             complete.mouse_event(size,event,button,col,row,focus=True)
         elif k == "window resize":
             size = ui.get_cols_rows()
         else:
             size = ui.get_cols_rows()
             complete.keypress(size, k)

Greg




More information about the Urwid mailing list