Specify a widget type for displaying column data
- Last Updated: April 16, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
You typically display data in an updateable browse column using a FILL-IN
widget. However, it can be useful to provide users with the ability to enter data in
browse cells using a combo-box or toggle-box widget. For example, when the user enters a
cell to edit it, they can select an entry from a combo box or check a toggle box. Not
only is this convenient, but it speeds data entry and reduces errors by ensuring that
the user selects only a valid choice for the field.
You can extend the behavior of an updateable browse in a Windows GUI to display data in a browse column using a combo-box or toggle-box widget.
The DISPLAY phrase includes the following VIEW-AS
phrase, which lets you specify a widget type for displaying values in a browse
column:
|
You can specify a DROP-DOWN combo box or a
DROP-DOWN-LIST combo box for a combo-box browse column in the
combo-box-phrase. When you use a DROP-DOWN or
DROP-DOWN-LIST combo-box widget in a browse column, a drop-down
button appears only when the editable combo-box column has focus. You can use a
DROP-DOWN combo box only for a CHARACTER column. You can use a
DROP-DOWN-LIST combo box for a CHARACTER, DECIMAL, INTEGER, INT64,
DATE, or LOGICAL column. The following figure shows a combo-box column with focus.
When you use a TOGGLE-BOX widget in a browse column, the toggle box
always appears whether it is enabled or not, and the toggle box is always centered
within the column. A solid outline appears to indicate that a cell in a toggle-box
column currently has focus. The following figure shows a toggle-box column with
focus.
If you do not specify a VIEW-AS phrase for the browse column, the widget
type for the column will be a FILL-IN, by default.
You can also add a combo-box or toggle-box browse column to a dynamic updateable browse widget by:
- Specifying the widget type in the
VIEW-ASattribute for a buffer-field object before creating the column with theADD-LIKE-COLUMN()orADD-COLUMNS-FROM()method - Passing the widget type as an optional parameter to the
ADD-CALC-COLUMN()orADD-LIKE-COLUMN( )method
For more information on the VIEW-AS phrase, COMBO-BOX
phrase, VIEW-AS attribute, and ADD methods, see their
respective reference entries in the ABL Reference.