skip to main content

Working With Controls : Creating a control : Displaying single controls : Displaying Screen Section items

Displaying Screen Section items
A control can also be defined as part of a Screen Section item:
level-number [control-handle] control-class
  { property-name  [IS]  property-value  }...
{ style-name } ...
{ embedded-procedure }
{ event-procedure }
embedded-procedure is defined as stated below. Refer to the Embedded Procedures section for a more detailed explanation.
[ BEFORE PROCEDURE IS procedure-1 [{THROUGH} procedure-2] ]
[ AFTER PROCEDURE IS procedure-3 [{THROUGH} procedure-4] ]
[ EXCEPTION PROCEDURE IS procedure-5 [{THROUGH} procedure-6] ]
event-procedure is defined as stated below. Refer to the Event handling section for a more detailed explanation.
[ EVENT PROCEDURE IS procedure-1 [{THROUGH} procedure-2] ]
A Screen Section item can also consist of a group containing controls. This is useful to create or destroy several controls with a single statement. This practice grants better performance, in comparison with the creation or destruction of one control at a time.
Below, is a sample of how a Screen Section item looks like:
01 MyScreen.
03 MyLabel LABEL
03 MyEntryField ENTRY-FIELD
MyScreen is the handle of the whole Screen Section item. MyLabel and MyEntryField are the handles of the controls.
The following statement creates the label and the entry-field at the position specified above and sets all of their properties:
DISPLAY MyScreen
If the same statement is executed again, all the properties are updated. An internal optimizer ensures that the properties are updated only when needed.
If the program displays a single item that has already been created, only its properties are updated. The optimizer works with single item DISPLAYs, too. The following statement updates only the properties defined for the Entry-Field identified by the handle MyEntryField.
DISPLAY MyEntryField

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left