Each control belongs to a particular type. The compiler knows the following type names:
ACTIVE-X | BAR |
BITMAP | CHECK-BOX |
COMBO-BOX | DATE-ENTRY |
ENTRY-FIELD | FRAME |
GRID | LABEL |
LIST-BOX | .NET |
PUSH-BUTTON | RADIO-BUTTON |
SCROLL-BAR | STATUS-BAR |
TAB | TREE-VIEW |
WEB-BROWSER |
Control type names are reserved by the compiler.
When you create a control, a handle to the control is also created. This handle is a COBOL data item that uniquely identifies the control to the system. The handle values are generated dynamically by the system at runtime and cannot be controlled by the programmer.
To provide a constant name for the control that is the same between runs, you can optionally assign an ID to the control. The ID is a programmer assigned number. Anytime the runtime returns information about a control, it includes both its handle and its ID. Since the handle can change from run to run, examining the ID can be more convenient. A control's ID is the only effective way to distinguish controls in a Screen Section because those controls' handles are hidden from the programmer.