Try OpenEdge Now
skip to main content
ABL Reference
Widget Reference : BROWSE widget
 

BROWSE widget

A browse widget lets you see data and select records from all the records associated with a database query. You can define a static browse widget with the DEFINE BROWSE statement or a dynamic browse widget with the CREATE BROWSE statement. A browse can be either a read-only tool for browsing through records, or it can be an editing tool for updating records, depending on the options you specify.
You can move and resize the browse and its components. Specifically, in graphical interfaces, you can move and resize the browse, move and change the width of the browse-column, and change the height of the browse-row. You can do all this through direct manipulation (by pointing, clicking, and dragging) and through ABL.
You can also use the mouse wheel to scroll the browse widget horizontally and vertically in Windows. When you rotate the mouse wheel up and down, the browse scrolls vertically up and down. When you rotate the mouse wheel up and down while holding down the CTRL key, the browse scrolls horizontally left and right. You can specify the number of rows the browse scrolls up and down per click of the mouse wheel on the Wheel tab in the Windows Mouse Properties dialog box (accessed through the Windows Control Panel).
The following figure shows a read-only browse widget with colors applied to some of the rows using the BGCOLOR attribute. Note that the fifth row is selected:
The following figure shows an updatable browse. Note the inline editing capability in the focused row:

Accessing browse attributes and methods

When accessing browse attributes and methods, it is important to understand the scope of each attribute and method. An attribute or method can apply to:
*The browse widget as a whole.
*A single browse column. In this case, any attribute or method that applies to a browse column, applies to:
*All cells in the browse column (that is, all cells of the given column for all rows of the browse)
*Any type of browse column (fill-in, combo-box, or toggle-box), except where noted
*A single browse cell. In this case, the attribute or method applies to only the given cell at the intersection of the referenced column and the focused row.
*Both the browse as a whole and a column or cell. For example, in the same trigger, you could change the background color of the whole browse to blue and the background color of the current cell to yellow.

Syntax

When accessing attributes and methods that apply to a browse widget as a whole, you must reference the browse widget using its name or handle, as shown in the following syntax examples:
/* For a static browse */
browse-name:attribute-or-method-name IN FRAME frame-name

/* For a dynamic or static browse */
browse-handle:attribute-or-method-name
The IN FRAME qualifier is only necessary for a static browse to avoid ambiguity.
When accessing attributes and methods that apply to a browse column or cell, you must reference the browse column or cell using the browse column's name or handle, as shown in the following syntax examples:
/* For a static browse column */
column-name:attribute-or-method-name IN BROWSE browse-name

/* For a dynamic or static browse column */
column-handle:attribute-or-method-name
The IN BROWSE qualifier is only necessary for a static browse to avoid ambiguity, but it is good programming practice to always include it, especially when you reference the same field as a separate widget type.
To access attributes and methods for a specific browse cell, you must be sure that a row is selected. You typically access browse cell attributes and methods in a ROW-DISPLAY trigger.
For more information about accessing widget attributes and methods, see the Handle Attributes and Methods Reference.

Attributes

The following table lists all the attributes for the browse widget and their scope:
Attribute
Applies to
Browse
Column
Column
Column
Browse
Cell
Browse, Column, Cell
Column
Browse, Column
Column
Column
Column
Column
Browse
Column
Column
Browse
Browse
Browse
Browse
Browse
Cell
Column
Column
Browse, Column, Cell
Column
Column
Browse
Browse
Browse
Cell
Cell
Browse
Browse, Column, Cell
Browse
Browse
Browse
Browse
Browse, Column, Cell
Cell
Browse
Browse
Browse
Browse
Browse
Browse
Browse, Column, Cell
Browse, Cell
Browse, Cell
Browse, Column
Browse
Browse, Cell
Column, Cell
Column
Cell
Browse, Column
Column
Browse
Browse, Column
Browse, Column
Browse, Column
Browse, Column
Column
Column
Browse
Column
Browse
Browse
Browse
Browse
Browse
Browse
Browse, Column
Browse, Column
Browse, Column
Browse
Browse, Column, Cell
Browse
Column
Browse
Browse
Browse
Browse
Browse
Browse
Column
Browse
Browse
Browse
Browse
Browse, Column
Browse, Column, Cell
Browse
Column
Browse
Browse
Browse, column
Browse
Browse, column
Browse
Browse, column
Browse, cell
Browse
Browse
Browse
Browse
Cell
Browse
Browse
Browse
Column
Column
Column
Browse
Browse
Browse
Column
Column
Column
Column
Browse
Browse
Browse, Column
Column
Browse
Browse
Browse
Browse
Browse
Browse
Browse, Column, Cell
Column
Browse
Browse, Column
Browse
Browse, Column, Cell
Browse, Column, Cell
Browse
Browse, Column
Browse, Cell

1 This attribute applies only to combo-box browse columns.

2 This attribute applies only to fill-in and combo-box browse columns.

3 This attribute applies only to fill-in and combo-box browse columns.

4 This attribute applies only to combo-box browse columns.

5 This attribute applies only to fill-in and combo-box browse columns.

6 This attribute applies only to fill-in and combo-box browse columns.

7 This attribute applies only to fill-in and combo-box browse columns.

8 This attribute applies only to fill-in and combo-box browse columns.

9 This attribute applies only to combo-box browse columns.

10 This attribute applies only to combo-box browse columns.

11 This attribute applies only to combo-box browse columns.

12 This attribute applies only to combo-box browse columns.

13 This attribute applies only to combo-box browse columns.

14 This attribute applies only to combo-box browse columns.

15 This attribute applies only to combo-box browse columns.

16 This attribute applies only to combo-box browse columns.

Methods

The following table lists all the methods for the browse widget and their scope:
Method
Applies to
Browse
Browse
Column
Column
Browse
Column
Browse
Browse
Column
Browse
Browse
Browse
Browse
Browse
Browse
Browse
Cell
Cell
Cell
Cell
Cell
Browse
Column
Browse
Browse
Browse
Browse
Column
Browse
Browse
Browse, Column
Column
Browse
Browse
Browse
Browse
Browse
Browse
Column
Browse
Browse
Browse
Browse
Browse
Browse
Browse
Browse
Column
Browse
Browse, Column

1 This method applies only to combo-box browse columns.

2 This method applies only to combo-box browse columns.

3 This method applies only to fill-in and combo-box browse columns.

4 This method applies only to combo-box browse columns.

5 This method applies only to fill-in and combo-box browse columns.

6 This method applies only to fill-in and combo-box browse columns.

7 This method applies only to fill-in and combo-box browse columns.

8 This method applies only to fill-in and combo-box browse columns.

9 This method applies only to fill-in and combo-box browse columns.

10 This method applies only to combo-box browse columns.

11 This method applies only to combo-box browse columns.

12 This method applies only to combo-box browse columns.

13 This method applies only to combo-box browse columns.

14 This method applies only to fill-in and combo-box browse columns.

Events

The following table lists all the events for the browse widget and their scope:
Event
Applies to
Browse, Cell
Browse, Column, Cell
Cell
Browse, Column
Browse, Column, Cell
Browse, Cell
Browse, Column, Cell
Browse
Browse
Browse
Browse
Browse, Cell
Browse
Browse, Cell
Browse
Browse
Browse
Browse
Browse
Browse
Browse
Browse

See also

DEFINE BROWSE statement, CREATE BROWSE statement