All controls have attributes associated with them.
Attributes control the behavior of the controls when your panel is displayed, and return information about your controls to you when GUI ScreenIO returns to your program. Four attributes are associated with each control; the attributes reside in the -1 portion of the panel copybook.
The attribute names are the name of your COBOL field, plus a suffix.
This makes it easy to use them, since the name of the attribute for any given
control is obvious. Here's what the attributes look like for a field named
myfieldname:
|
01 panel-1.
|
The paint attribute is used primarily to tell GUI ScreenIO which control should be active when your panel is displayed, or to mark errors. On return from GUI ScreenIO, it will tell you which control was active when GUI ScreenIO returned to your program. It can also tell you when a control causes GUI ScreenIO to return to your program.
| Value | Action |
| C | Makes this the active control when the panel is displayed. |
| E | Marks the control the error color (if applicable). |
| I | Makes this the active control when the panel is displayed and sets the insert point at the offset specified in panel-INSERT-POINT. |
| - | Any other value; no action. |
| Value | Significance |
| - | Default value (LOW-VALUE); nothing significant happened. |
| A | This control was the active control. |
| F | This control's definition requires it to cause GUI ScreenIO to return to your program (Hot Field) when the Field became Full. |
| H | This control's definition requires it to cause GUI ScreenIO
to return to your program in some
situations, (Hot Field) and such a condition was detected.
These conditions are such things as, return when the control becomes active, return when you leave the control, return when the control is changed, and so on. |
The color attribute is used to override the color of a field that was specified in the panel editor.
| Value | Action |
| 0 | Use the default color. |
| xx | A named color
value.
You define a set of foreground/background color combinations by name in the panel editor, and then simply move the one you want - by name - to the field's color attribute to change the color of the field's contents. |
| 1-255 | Only for backward compatibility with applications converted from Legacy ScreenIO. Assigns this color number to the control. New applications should use named colors. |
| Value | Significance |
| - | Unchanged. |
The option attribute is used to make a control protected or invisible.
| Value | Action |
| P | Makes the control protected (you can't alter its contents). |
| I | Makes the control invisible (and protected). |
| R | Sets Edit Controls to ReadOnly, and disables
tabbing into this control, prevents typing in the control, but allows copy
operations.
Note: Honored only for Edit Controls, Multi-Line Edit Controls, and Validated Edit Controls. |
| - | Any other value; no action. |
| Value | Significance |
| - | If value is Valid (as defined above), it will be returned unchanged. Invalid values will be returned as low-values. |
| Value | Action |
| - | Presently unused. |
| Value | Significance |
| - | Default value (LOW-VALUE); nothing significant about this control. |
| M | The control content was modified by the user. |
| © 2000-2006 Norcom, all rights reserved |