[prog] curses forms paging

ed orphan millward at Ms.UManitoba.CA
Thu Mar 4 22:30:11 EST 2004


I got it ! You only have to use
 set_new_page( field whatever, TRUE);
before creating the form and posting it.
In the input loop switch, do something
like:
   input = getch()
   switch( input ) {
      case KEY_NPAGE:  /* page down key */
            form_driver( my_form, REQ_NEXT_PAGE);
         then the mvprintw statements for the second page
            refresh();
            break;
       case KEY_PPAGE:  /* page up key */
            form_driver(my_form, REQ_FIRST_PAGE);
        then the mvprintw statements for the first page
            refresh();
            break;
I'm sure someone with more experience knows a 
better way, but this works for me.  Improvements are
welcome!     




More information about the Programming mailing list