Thanks Joshua,

It's pretty easy to make a scroll bar to handle a specific use case.
You can make a 1-column wide Pile that uses SolidFill for the bar and
background regions.

It's quite a bit harder to make one for the general case. ListBox
supports unlimited contents, so you would have to limit the list
walkers you can use. Next you have to decide if the position within a
list is sufficient or if you need to know the number of actual rows of
each item. For some lists the bar would perform badly without the
exact number of rows. If you need the exact rows then that means you
need to calculate the width of every item in the list, which for long
lists is going to be quite slow, and would need to be re-done every
time the width of the ListBox changes.

Have you considered just having markers that indicates whether you can
scroll up and/or down? There's an ends_visible() method on ListBox
just for this purpose.

Another approach is to show your position within the list in a footer,
the way less or vim do.

Ian

On Sun, Dec 15, 2013 at 10:24 PM, Joshua Harlow <[email protected]> wrote:
> Hi all urwid devs,
>
> Thanks for the great library!
>
> It has allowed me to create a few useful tools @
> https://github.com/harlowja/gerrit_view/
>
> One feature that I am lacking though is a vertical scrollbar (it would be
> nice to know the current scroll status of a listbox for example, in said
> GUIs at the above github site). I have seen that there are/were a few
> attempts at it (but none seem to be in the offical repo). Has there been any
> progress there, maybe a release with hbar and vbar support??
>
> Thoughts??
>
> -Josh
>
> --
> --
> facebook.com/jshharlow
> flickr.com/jshharlow
> YIM: jshharlow
>
> _______________________________________________
> Urwid mailing list
> [email protected]
> http://lists.excess.org/mailman/listinfo/urwid
>

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

Reply via email to