[Urwid] New scroll columns proposal.

Ian Ward ian at excess.org
Sat Nov 19 19:03:35 EST 2005


antonio araujo wrote:

>Hello Ian.
>I am working on the table record editor for Deckard, and I need some
>scroll posibilities in the columns.
>I send you my working version of the class Columns with horizontal scroll.
>Take a look. I think may be interesting for urwid.
>
>If you think this can be a problem with the rest of your library, then
>say me if you are working in the same direction. I need something like
>this to edit tables.
>
>Cheers.
>Antonio.
>  
>
I was thinking about solving the more general problem of wanting a 
widget that is wider than the available display space and allowing the 
user to scroll horizontally through it. Think of a widget that could 
wrap the Columns, ListBox or any other widget and display only a 
specified vertical slice of the widget it contains.

I'm not sure when I will have a chance to write it, so your solution is 
certainly good for now.

By the way, you might want to use a class like this to implement the 
'tab' and 'shift tab' behavior you want in Deckard:

class TabbingEdit(urwid.Edit):
    def keypress(self, (maxcol,) key ):
       if key == 'tab': return 'right'
       if key == 'shift tab' or key == 'ctrl b': return 'left'
       return urwid.Edit.keypress(self, (maxcol,), key)

Ian




More information about the Urwid mailing list