bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ncurses applications: best practices


From: Stephan Beal
Subject: Re: ncurses applications: best practices
Date: Thu, 25 Sep 2008 14:12:28 +0200

On Thu, Sep 25, 2008 at 2:07 PM, Sentinel <address@hidden> wrote:
> I will be implementing multiple rows / lists tonight. Say 100 rows of data
> while I display 25 at a time. Does ncurses provide anything for this, or is
> it just the usual programming job. I remember reading of off-screen rows and
> buffers but that's for one field iirc.


You can use a PAD object for this. PADs are basically windows which
are of arbitrary size (i.e. can be bigger than the screen). PADs are
used together with a WINDOW, where the window acts as a viewport. They
take some getting used to (and a lot of experimentation), but they
would do nicely for what you want, i think.

> I am not asking for programming logic here just anything in ncurses I could
> have missed, or that someone here has learned after much struggle.

"curses" is synonymous with "much struggle" ;).

> btw, When I use the arrow key to go down after the last item, it does jump
> back to the top. How to disallow that so i can repopulate my fields.

i can't answer anything about the forms - i've never used the ncurses
forms/menu parts.

> Any tips for multi-row scrollable lists would be very appreciated.

PADs

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]