Release 10.1A: OpenEdge Development:
Progress 4GL Handbook

> ## Assigning object attributes

> The optional `ASSIGN` phrase allows you to assign one or more attribute values for the object at the time you create it. The `attribute-value` for each `attribute` can be a constant or it can be an expression. You can use the same `CREATE` statement for multiple objects of the same type that need to have different attribute values. Alternatively, you can assign attribute values after you create the object by using this syntax:

>     handle:attribute = attribute-value

> The attributes you can assign to a dynamic object are largely the same as those you can assign in a static definition. You can find a complete list of all the attributes supported by each object in OpenEdge Development: Progress 4GL Reference material or in the online help, under the object-type Widget topic (for example, Button Widget). In the description of many of these attributes, there are one or more special restrictions attached to the attribute:

> - Readable only — These attributes can be read and used in expressions using the `handle``:``attribute` syntax, but their values cannot be assigned. In some cases, this is because the attribute value is part of the definition of the object and it would not make sense to change it. Examples of these attributes are:

> - `DYNAMIC` — Always true for dynamic objects and always false for static objects.
> - `HANDLE` — Holds the value of the object’s handle.
> - `TYPE` — Evaluates to the `object-type`.

> In other cases, an attribute value cannot be assigned directly because it is set indirectly using some other method or statement. For example, most visual objects have a `TAB-POSITION` object, which holds the sequential position of the object within its frame. You cannot set this directly, but rather you must use the `MOVE-BEFORE-TAB-ITEM` or `MOVE-AFTER-TAB-ITEM` methods on an object to change its tab position, which is then reflected in the value of its `TAB-POSITION` attribute.

> - Can be set only before the widget is realized — You learned about realized objects in Chapter 8, " Defining Graphical Objects." Some attribute values cannot be changed after the object has been realized. An example of this is the `DEFAULT` attribute for a button. The default button for a frame is the button that receives a `RETURN` event for its frame when the user presses RETURN or ENTER, which in turn executes its `CHOOSE` trigger. Once a button has been established as the default button for the frame and the button has been realized, when the frame is viewed, this attribute can’t be changed.

> - Graphical interfaces only — Progress supports most visual objects in character environments as well as GUI, but some object attributes can only be supported in graphical interfaces. An example is the `BGCOLOR` (background color) of a fill-in field. A fill-in field in a character environment does not use this attribute.

> - Character interfaces only — Likewise, some attributes are supported only in character interfaces. An example is the `DCOLOR` of a button or other visual object, which is its display color.

> - Windows only — Progress today supports a graphical interface only for the Microsoft Windows platform, so effectively any attributes marked as Windows only are the same as graphical interfaces only.

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