10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

How You Can Create and Modify Fields DynamicallyThe presence of the frame status bar and its associated informational text canbe set in OpenROAD Workbench, or in the 4GL script of the frame. Thefollowing code is an example of how the status bar can be used when themouse is over a particular field:Begincurframe.hasstatusbar = true;curframe.statustext = 'Your mouse cursor is overthe form.';field(field0).mousemovetext = 'Your mouse cursoris over field0';endFor more information about how to use the frame status bar, see the attributesof the FrameSource, FrameExec, FormField, and MenuField classes in theLanguage Reference <strong>Guide</strong> online help.How You Can Create and Modify Fields DynamicallyThis section describes how to create and modify fields dynamically.How You Can Create Dynamic Simple FieldsDynamically creating simple fields (ShapeFields or ScalarFields) is a simplefour-step process:1. Declare a reference pointer to a field of the appropriate type.Unless you declare it with default null, the declaration creates an instanceof the object. The following code declares and instantiates a free trimobject called nextquarter:initialize ()=declarenextquarter = FreeTrim;labelstart = integer not null;linechart_subform = Subform;i = integer not null;name_array = array of StringObject;bfield = ButtonField;stack_field = StackField;efields = EntryField;colname = varchar(11) not null;dexp = DynExpr default null;enddeclare2. Create a new instance of the field if necessary.The following code creates a new free trim object called nextquarter:nextquarter = FreeTrim.Create();Creating Dynamic Frames 373

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!