Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Scrollbars in Curses::UI?

by Muskovitz (Scribe)
on Mar 25, 2020 at 09:27 UTC ( #11114629=perlquestion: print w/replies, xml ) Need Help??

Muskovitz has asked for the wisdom of the Perl Monks concerning the following question:


Is there a way to create a scrolling functionality in Curses::UI?
Stated here: Curses::UI::Widget#SCROLLBARS:

Since the user of a Curses::UI program has no real control over the so + called "scrollbars", they aren't really scrollbars. A better name wo +uld be something like "document location indicators". But since they +look so much like scrollbars I decided I could get away with this nam +ing convention.

So I did try, here's my code:
my $container = $win1->add( 'vulnerability', 'Container', -title => "List of Street Addr", -height => 50, -border => 1, -y => 1, -width => 60, -height => 20, -bfg => 'blue', -vscrollbar => "right", -vscrolllen => 20 );
I have really no control over the scrollbar, So if any of you knows how to get around this. Please enlighten me. Thanks.

Replies are listed 'Best First'.
Re: Scrollbars in Curses::UI?
by choroba (Archbishop) on Mar 25, 2020 at 15:39 UTC
    Synchronicity? A similar question has recently been posted to StackOverflow. Check there for possible answers, too.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11114629]
Approved by marto
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2020-04-04 12:08 GMT
Find Nodes?
    Voting Booth?
    The most amusing oxymoron is:

    Results (32 votes). Check out past polls.