Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

SCROLLTEXTWINDOW

Graphics Subroutine: Scrolls the contents of a text window. This routine is only available for Windows.

Module

USE IFQWIN

CALL SCROLLTEXTWINDOW (rows)

rows

(Input) INTEGER(2). Number of rows to scroll.

The SCROLLTEXTWINDOW subroutine scrolls the text in a text window (previously defined by SETTEXTWINDOW). The default text window is the entire window.

The rows argument specifies the number of lines to scroll. A positive value for rows scrolls the window up (the usual direction); a negative value scrolls the window down. Specifying a number larger than the height of the current text window is equivalent to calling CLEARSCREEN ($GWINDOW). A value of 0 for rows has no effect.

Example

! Build as QuickWin or Standard Graphics app. USE IFQWIN INTEGER(2) row, istat CHARACTER(18) string TYPE (rccoord) oldpos CALL SETTEXTWINDOW (INT2(1), INT2(0), & INT2(25), INT2(80)) CALL CLEARSCREEN ( $GCLEARSCREEN ) CALL SETTEXTPOSITION (INT2(1), INT2(1), oldpos) DO row = 1, 6 string = 'Hello, World # ' CALL SETTEXTPOSITION( row, INT2(1), oldpos ) WRITE(string(15:16), '(I2)') row CALL OUTTEXT( string ) END DO istat = displaycursor($GCURSORON) WRITE(*,'(1x,A\)') 'Hit ENTER' READ (*,*) ! wait for ENTER ! Scroll window down 4 lines CALL SCROLLTEXTWINDOW(INT2( -4) ) CALL SETTEXTPOSITION (INT2(10), INT2(18), oldpos) WRITE(*,'(2X,A\)') "Hit ENTER" READ( *,* ) ! wait for ENTER ! Scroll window up 5 lines CALL SCROLLTEXTWINDOW( INT2(5 )) END