|
Because the subfiles were in windows and I did not restrict the cursor to the windows, it everything was working. You could move the cursor to either subfile an roll it up or down. Literally, the only think I didn't have working (that I know of) was the positioning of the cursor.
Sooooo,
I ended up with a similar solution to Booth's. Each subfile had 5 rows so I created a record with two sections of 5 records (fake subfiles) along with the other stuff that was the screen in the record and other window. When the user hits page up or page down, I check to see which "subfile" then are in and "roll" that section by incrementing the current index of my data structure and then populating the 5 lines.
And, as I half expected, when they saw the screen, they didn't want to go to another screen to update the values in the subfile so I had to make them modifiable on the main screen.
I had really hoped there was an easier solution. Faking a subfile especially one that is now modifiable is such a pain.
-----Original Message-----
From: RPG400-L<rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Booth Martin
Sent: Wednesday, May 8, 2019 4:55 PM
To: RPG programming on IBM i<rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Trying to position cursor on complicated screen
Part two Should have mentioned this before.
Your description includes two subfiles, which do not lend themselves to a 24x80 data structure solution.
My solution has been to meld them in to one 75-char subfile. Make 2 or 3 75-char datastructures (or however many you need for your various rows) and feed them as needed into the single subfile.
If you go that route you will want constants for various field effects:
Color Codes
Color Normal Underbar Reverse Image Underbar& Reverse Image
Nondisplay Blink Blink& Reverse Image Blink& Underbar
Green
X'20' X'24' X'21' X'25'
White
X'22' X'26' X'23'
X'27'
Red
X'28' X'2C' X'29' X'2D' X'2F' X'2A' X'2B' X'2E'
Turquoise
X'30' X'34' X'31' X'35'
Pink
X'38' X'3C' X'39' X'3D'
Blue
X'3A' X'3E' X'3B'
X'3F'
Yellow
X'32' X'36' X'33'
X'37'
On 5/8/2019 3:30 PM, Booth Martin wrote:
The issue I have had with this scenario is that only one format can be
active at a time.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.