[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

scrollok Subroutine

Purpose

Enables or disables scrolling.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>


scrollok( Window, Flag)
WINDOW *Window;
bool Flag;

Description

The scrollok subroutine enables or disables scrolling. Scrolling occurs when a program or user:

If enabled, curses calls a refresh as part of the scrolling action on both the window and the physical display. To get the physical scrolling effect on the terminal, it is also necessary to call the idlok (idlok Subroutine) subroutine.

If scrolling is disabled, the cursor is left on the bottom line at the location where the character was entered.

Parameters

Flag Enables scrolling when set to TRUE. Otherwise, set the Flag parameter to FALSE to disable scrolling.
Window Identifies the window to enable or disable scrolling in.

Examples

  1. To turn scrolling on in the user-defined window my_window, enter:

    WINDOW *my_window;
    scrollok(my_window, TRUE);
  2. To turn scrolling off in the user-defined window my_window, enter:

    WINDOW *my_window;
    scrollok(my_window, FALSE);

Related Information

The idlok (idlok Subroutine) subroutine.

Curses Overview for Programming, List of Curses Subroutines, Manipulating Characters with Curses in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]