referenced-at:
https://github.com/wmcbrine/PDCurses/issues/124 #include <curses.h>
#include <panel.h>
int main( void)
{
int ch = -1;
WINDOW *pad1;
PANEL *panel1;
initscr ();
noecho ();
start_color();
init_pair(1, COLOR_BLUE, COLOR_RED);
keypad(stdscr, TRUE);
refresh();
pad1 = newpad(10,10);
wbkgd (pad1, COLOR_PAIR(1));
waddstr (pad1,"Test.");
prefresh(pad1, 0, 0, 1, 2, 4 , 9);
panel1 = new_panel(pad1);
while(ch != 'q' && ch != 'Q')
{
ch = getch();
if (ch == KEY_UP ) show_panel(panel1);
else if (ch == KEY_DOWN) hide_panel(panel1);
update_panels();
doupdate();
}
endwin( );
return(0);
}