Progress
AppBuilder
Developer’s Guide


AppBuilder Create (adeuib/_uib_crt.p)

Use the adeuib/_uib_crt.p procedure to create objects in AppBuilder. You can create under program control the objects found in the custom object files. The TYPES, ARGUMENTS, and CUSTOM TYPES are the same as those defined in the custom object files. This acts just as if you choose a button from the Object Palette and insert it into a window or frame:

Calling Sequence
RUN adeuib/_uib_crt.p
  ( INPUT pi_parent ,
    INPUT pc_type ,
    INPUT pc_custom ,
    INPUT pd_Row ,
    INPUT pd_Column ,
    INPUT pd_height ,
    INPUT pd_width ,
    OUTPUT pi_context
   ) . 

Input Parameters

The adeuib/_uib_crt.p procedure takes the following input parameters:

pi_parent

The context ID of the parent of the object to create. If this is unknown (?), the parent is assumed to be the current frame. If there is no current frame, then the current window is assumed.

pc_type

The type of object to create (for example, “BUTTON” or “SmartObject”).

pc_custom

The name of the custom object type (for example, “OK Button”). If this is unknown (?), the “&Default” object is created. This is of the form:

"case:value" 

Special Cases of pc_custom

Here are some special cases of the pc_custom parameter:

"Custom:name"

The name of the custom object defined in Custom files. For example, the following draws a Next button:

Custom:&Next 

"SmartObject:object-file"

The name of a SmartObject to load. For example:

SmartObject: C:/Progra~1/Progress/gui/object/p-nav.w 

"SPECIAL:attributes-values"

This is similar to creating a new custom object file entry temporarily. The attributes and values are parsed the same way as entries in the custom object file. Blank lines are ignored. You must separate lines with a carriage return (that is, CHR(10)). For example:

"SPECIAL: " +
   "BGCOLOR    7 " + CHR(10) +
   "FONT       2 " + CHR(10) +
   "NAME       test". 

pd_ROW

The ROW to create the object.

pd_COLUMN

The COLUMN to create the object.

pd_HEIGHT

The HEIGHT of the object in characters; if unknown (?), the default height is used.

pd_WIDTH

The WIDTH of the object in characters; if unknown (?), the default width is used.

Output Parameter

The adeuib/_uib_crt.p procedure uses the following output parameter:

pi_context

The context ID of the object created. If the creation fails, this is unknown (?). You can use this value as the object context ID for the companion programs, which are adeuib/_accsect.p, adeuib/_uibinfo.p, and adeuib/_uib_del.p.

Return Values

The adeuib/_uib_crt.p procedure returns:

"Error"

If pi_context does not point to a valid object.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095