Recently, I rediscovered the ENTFLDATR keyword. This NPTUI (pronounced "en-pa-tooy") keyword allows you to set the field attribute for an input field when the cursor enters the field.
The keyword allows you to make a boring old 5250 green-screen application behave a little more like a PC GUI by changing the field attributes when the user tabs or cursors into the field.
The variation of this keyword I prefer to use is to make the field reverse image when the cursor enters it. To do this, specify the following keyword, either at the record level or on the field itself.
This provides a very cool-looking effect. If you've ever wondered how the DBU product does what it does with its user interface, this is probably it.
For a quick example of how this keyword works, enter the following DDS and stub it into a program. Then, do an EXFMT on the DSPREC record format. As you tab from field to field, the attributes will automatically change from underline to reverse image.
|
Figure 1: Here's a sample display file using the ENTFLDATR keyword.
Bob Cozzi is a programmer/consultant, writer/author, and software developer. His popular RPG xTools add-on subprocedure library for RPG IV is fast becoming a standard with RPG developers. His book The Modern RPG Language has been the most widely used RPG programming book for more than a decade. He, along with others, speaks at and produces the highly popular RPG World conference for RPG programmers.
LATEST COMMENTS
MC Press Online