ACUCOBOL-GT allows you to create, display, and process graphical controls. Graphical controls are also commonly called graphical objects or widgets. Some examples of common graphical controls include push buttons, list boxes, radio buttons, check boxes, and entry fields (text entry boxes). ACUCOBOL-GT provides a consistent method for specifying and handling graphical controls. Several common control types are supported. Future versions of ACUCOBOL-GT may incorporate additional control types.
Graphical controls have several important components:
Common properties that apply to virtually all controls include:
location | Each control has a screen location. The location is given as row and column coordinates that specify the position of the upper left-hand corner of the control on the screen. The character coordinate phrases CLINE and CCOL can be used to specify an alternate control location for use on a non-graphical system. |
size | Controls have size information. The size information is given as width and height. The exact meaning of the width and height depends on the control type. Some control types have a predefined size (in one or both dimensions). The character coordinate phrases CSIZE and CLINES can be used to specify an alternate control size for use on a non-graphical system. Controls can also be given minimum and maximum size specifications. This is useful if you want to change the size of a control when the window changes size. Layout managers frequently use this information. See Layout Managers for more information. |
titles | Controls can have titles. This usually appears as a text label attached to the control. Examples include the text on a push button or the text beside a check box. Some controls, such as entry fields, do not use titles. |
value | A control also has a value. The value of a control is the user-modifiable portion of that control. For an entry field, this is the text entered into the box. For check boxes, the value is whether the box is checked or not. Some controls, such as push buttons, do not have values. The exact range of values allowed is determined by the control type. |
color | Controls have color. Both foreground and background colors apply. The exact meaning of the color information depends on the control type. Some controls or host systems may limit the choice of colors. |
font | Most controls have a font that is used when text is displayed in conjunction with the control. |
event lists | For any control that generates events, you can create an event list that specifies for that control the types of events that must be received or filtered out. |
styles | Controls also have style properties. Style properties typically affect the visual presentation of the control. For example, a push button may be assigned the DEFAULT style, which causes the push button to be drawn with a thick border to indicate that it is the default action. |
Some styles apply to all controls. However, each control has its own additional styles. Each style is described in Control Types Reference.
Certain Operating System styles or themes have an effect on the appearance of controls. For details on how ACUCOBOL-GT applications behave when certain styles are in effect, see Visual Styles and Differences Among Operating Systems.
There are also common properties that determine whether a control is displayed (VISIBLE), whether a control will respond to the user (ENABLED), or whether a control has a key letter that the user can use to activate the control with the keyboard (KEY).
Rather than using a unique syntax to define each control type, ACUCOBOL-GT provides a generic method for specifying a control's characteristics. The programmer then selects the attributes that are applicable to each desired control.