Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : VIEW-AS attribute
 

VIEW-AS attribute

Sets the widget type of a dynamic or static browse column for a buffer-field object.
Data type: CHARACTER
Access: Readable/Writeable
Applies to: Buffer-field object handle
Set this attribute to specify the widget type for a dynamic browse column (that is, a column created with the ADD-LIKE-COLUMN( ) method or ADD-COLUMNS-FROM( ) method). Valid values are "COMBO-BOX", "DROP-DOWN", "DROP-DOWN-LIST", "FILL-IN" and "TOGGLE-BOX". The default value is "FILL-IN".
Note: In a character interface, the widget type displayed for browse columns is always FILL-IN no matter what value you specify for this attribute.
As an added convenience, you can also create a combo-box browse column by setting the buffer-field's VIEW-AS attribute to "COMBO-BOX" and setting its SUBTYPE attribute to either "DROP-DOWN" or "DROP-DOWN-LIST".
A widget type of "COMBO-BOX" or "DROP-DOWN-LIST" is valid only when the buffer-field's data type is CHARACTER, DATE, DECIMAL, INTEGER, INT64 or LOGICAL. A widget type of "DROP-DOWN" is valid only when the buffer-field's data type is CHARACTER. A widget type of "TOGGLE-BOX" is valid only when the buffer-field's data type is LOGICAL. If the widget type is not valid for the buffer-field's data type, the AVM generates a run-time error.
Setting this attribute to the Unknown value (?) restores the default value of "FILL-IN".
You can query this attribute for the widget type of a dynamic or static browse column.
For any type of combo-box browse column, this attribute returns "COMBO-BOX". Refer to the column's SUBTYPE attribute to determine whether the combo-box is a DROP-DOWN or DROP-DOWN-LIST combo-box.