Programming Guide : Creating a Frame at Runtime : How You Can Build a Frame Dynamically
 
Share this page          
How You Can Build a Frame Dynamically
When you build a frame dynamically, you must do in 4GL the tasks that you (or OpenROAD) would do if you were using OpenROAD Workbench to create a frame, which include:
Create a frame and set its attributes
Create the form associated with the frame
Create the fields on the form and set their attributes
Create the frame's menu
Create the frame's script
The preceding tasks require you to create several objects, for example, a frame, a form, and a menu. To create an object dynamically, use the Create method. Executing the Create method returns an object of the specified class.
The syntax of the Create method is:
refvariable = Class.Create()
refvariable
Specifies a return variable that must have been declared as the same class as Class or one of its superclasses. For example, if you want to create an entry field, you must first declare the reference variable that points to the object:
field_ptr = EntryField;
Then you can use the following statement to create the actual object:
field_ptr = EntryField.Create();
Class
Specifies the class of the object that you want to create