[Urwid] ListBox Won't Scroll Using Keys
Ryan Ross
ryanross at ece.ucsb.edu
Tue Sep 12 10:59:27 EDT 2006
Thanks for the help Greg! I guess I was confused. Under the tutorial Section
2.3 it has a definition for a keypress function, which I took out for now. I
didn't realize or notice that most of the widgets have a keypress method
as well.
Thanks for fixing my program! :)
Ryan
On Monday 11 September 2006 4:38 pm, Greg Hamilton wrote:
> 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