Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WindowScrollDown - ISL

Status
Not open for further replies.

nvak

Programmer
May 25, 2015
60
GR
Can anyone provide me a sample (not the one inlcuded in documentation) on how can i scroll down a window and write 20 lines of Information in an 12 lines window?
 
Are you using the Display Window? or the Check Detail area?
 
3700 or 9700 system? and give me a little bit and I will post something for you.
 
9700 system.

I want to fit in 12line window more than 20 lines.

I can see int the documentation that there are the WindowScrollDown and WindowScrollUp commands but i can not do it work.
 
I've had no luck with that, I've found that you need to put your data into an array and use it that way. So with each page down it populates with new information.

What are you displaying?
 
Lets say that i want to display numbers from 1 to 20 each one in new line.
 
i have a test.txt file with 20 lines.
This is the best I can do on 3700 system.
On 9700 these commands dont work.

The problem is that if you go up or down the window doesnt keep in memory the not display lines.

So it is useless.

Code:
EVENT INQ : 4
	VAR FN : N3
	VAR FNAME : A40 = "/MICROS/Res/Pos/Etc/test.txt"
	VAR LINE : A78
	VAR MAX_ROW : N3 = 12
	VAR ROW : N3
	VAR MOVE : A1
	
	FOPEN FN, FNAME, READ
	IF FN = 0
		CALL FERR( FNAME )
	ENDIF
	
	WINDOW MAX_ROW, 78 				
	WHILE NOT FEOF( FN ) 										
		FREADLN FN, LINE 
		CALL DISPLAY_LINE( LINE ) 
	ENDWHILE
	
	FOREVER
		INPUT MOVE, "    UP(1) - DOWN(2) - QUIT (3)" 
		IF MOVE = 1
			WINDOWSCROLLDOWN
		ELSEIF MOVE = 2
			WINDOWSCROLLUP
		ELSE
			BREAK
		ENDIF
	ENDFOR
ENDEVENT

SUB DISPLAY_LINE( REF LINE )
	VAR COL : N3 = 1
	IF ROW < MAX_ROW 	
		ROW = ROW + 1 			
	ELSE
		WINDOWSCROLLUP 
	ENDIF
	DISPLAY ROW, COL, LINE 
ENDSUB

SUB FERR( REF FNAME)
	EXITWITHERROR "CAN'T OPEN FILE ", FNAME
ENDSUB
 
Correct, the scroll up doesn't work in the 9700 system, at least I have never gotten it to work. The 9700 SIM doc has a similar (if not the same) example. I've only gotten new pages to work when the information is added to an Array. I've only created arrays with interfaces that receive the information from this interface and not in a single file or instance, so what happens is that if there is more than 1 page being sent on the interfaces side it know theres additional pages and when you select the "NEXT PAGE" it calls the interface back and returns with the new page and so on.

I've created a script that reads a file and will put the information into an Array and displays the info in the Window, however I need to fine tune it to allow for the additional pages. I will post it shortly.
 
Here you go, hope this helps. The script is in the zipped file and I also include a test file as well. I've commented through out the script as I normally do. I have a few thoughts on how to allow it to have more than 4 Message Arrays (4 pages), but I wanted to get this to you first. My email is in the isl file if you need further assistance and of course we are all here to help out as well.

::EDIT::
Forgot to mention what the script does (for others), the script reads a text file (various text formats), and puts them into an array of 12, and each 12 is a single page, each page is displayed in the Window Display. When ENTER is pressed, it will move on to the next page (if another page exists). The script was tested on a Micros 9700 3.6 system.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top