|
Hi William - >I've attempted to use the SFLMODE keyword on the subfile >control to determine if I'm in "fold" or "drop" mode with >success, but when I try to set the SFLROLVAL keyword (I also >have it hidden and protected), I get nowhere. The affect >of resetting the SFLROLVAL is "one screen too late", almost >as if the read doesn't occur after I press me F-key to >change the mode. The problem is that when the F-key is pressed to change modes, control is not returned to the program (unless the subfile is empty, in which case there really isn't anything for the program to do). What you need to do is to assign the F-key that the users use to fold/unfold as a CF key. Assign some other unused F-key as the SFLDROP/SFLFOLD F-key. You don't want the users to ever actually press that key. When a user presses the F-key that is now just a regular CF key, your program will get control. It can change the SFLROLVAL value. It also will need to turn a indicator on or off to toggle the mode of the subfile manually. Here is some DDS code: A CF10 A N55 SFLDROP(CF22) A 55 SFLFOLD(CF22) A SFLMODE(&@MTRUNC) ... A @MTRUNC 1 H F10 is the key that the users press to change modes. Since that is just a regular F-key, the program gets control. In the program, F10 is used to toggle the value of @MTRUNC, then redisplay the subfile. The section of code that displays the subfile sets indicator 55 to the proper value based on @MTRUNC. In your case you would also set the SFLROLVAL at that point. (If a user presses F22, the subfile toggles as normal without any other change. Since F22 won't be listed on the screen as a valid function key, hopefully the users will never press it.) Ken Southern Wine and Spirits of Nevada, Inc. Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind.
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.