=========================================================================== BBS: The Abacus * HST/DS * Potterville, MI Date: 03-07-93 (14:37) Number: 20 From: BOB PERKINS Refer#: NONE To: TODD TYLER Recvd: NO Subj: Re: Scrolling Conf: (35) Quick Basi --------------------------------------------------------------------------- TT> I'd like to know how to go about displaying information on TT> the screen that is more than one screenful, and be able to TT> scroll it up or down. I can't seem to figure out how this TT> is done, other than maybe the info is stored in some kind of buffer? Here's a simple way you could go about it. Should give you a starting point a nyway. DIM text(1 TO 300) AS STRING * 80 '300 80-character lines of storage DECLARE SUB put2screen (start%, count%) OPEN "test.txt" FOR INPUT AS #1 count% = 0 CLS LOCATE 25, 1: COLOR 0, 7: PRINT SPACE$(80); LOCATE 25, 30: PRINT "Obligatory Status Bar"; COLOR 7, 1 'read entire file into array keeping track of the top record with count% DO WHILE NOT EOF(1) count% = count% + 1 LINE INPUT #1, text(count%) IF count% > 299 THEN 'array overflow protection.. BEEP: PRINT "Couldn't load the whole file..": SLEEP 2: EXIT DO END IF LOOP CLOSE #1 start% = 1 'set pointer to first line of file put2screen start%, count% 'start out by displaying first page of data esc$ = CHR$(27): null$ = CHR$(0) DO a$ = INKEY$ IF LEN(a$) THEN SELECT CASE a$ CASE null$ + "H" 'Up Arrow IF start% > 1 THEN start% = start% - 1 put2screen start%, count% END IF CASE null$ + "P" 'Down Arrow IF start% < count% THEN start% = start% + 1 put2screen start%, count% END IF CASE null$ + "Q" 'Page Down start% = start% + 24 IF start% > count% THEN start% = count% put2screen start%, count% CASE null$ + "I" 'Page Up start% = start% - 24 IF start% < 1 THEN start% = 1 put2screen start%, count% CASE esc$: EXIT DO END SELECT END IF LOOP END SUB put2screen (start%, count%) SHARED text() AS STRING * 80 'start is starting record number from 1 to count% t% = 1 CLS 2 FOR x% = start% TO start% + 23 'use full screen IF x% > count% THEN EXIT FOR LOCATE t%, 1: PRINT text(x%); t% = t% + 1 NEXT x% END SUB --- Msg V4.5 * Origin: Reciprocity Failure (1:124/4115.236) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/2 159/100 125 430 950 203/23 209/209 280/1 SEEN-BY: 390/1 396/1 15 397/2 2230/100 3603/20