Changing the Horizontal and Vertical Scrolling Quantities

By default, the horizontal and vertical scrolling quantities are both set to 1 when the window is defined in code or created in the Designer. A horizontal scrolling quantity of 1 means that if the virtual cursor is in the last column position of the window and the virtual cursor moves one column to the right, the window will move just one column to the right. Similarly, the window moves only one row if the virtual cursor is advanced to the next row.

Changing the adjustment quantities to higher values prevents continual adjustments of the window's origin every time you write to the window and cause the virtual cursor to advance. For instance, changing the horizontal adjustment quantity to 4 means that if the virtual cursor is in the last column position of the window and the virtual cursor moves one column to the right, the window will move four columns to the right. Thus, three more characters can be written in the row before the window will need to be adjusted again.

To change the scrolling quantities for the window, use the set window adjust quantity function, sw_adjq():

void sw_adjq(horzq, vertq, wnp)
 
int horzq;
/* Horizontal adjustment quantity
*/
int vertq;
/* Vertical adjustment quantity
*/
WINDOWPTR wnp;
/* Pointer to window
*/

The adjustment quantity you specify cannot be larger than the number of rows or columns in the interior working area of the window.


Home Contents Previous Next