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:
The following figure shows an updateable 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:
- 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.
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:
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:
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" section.
AttributesThe following table lists all the attributes for the browse widget and their scope:
1This attribute applies only to combo-box browse columns.
2This attribute applies only to fill-in and combo-box browse columns.
MethodsThe following table lists all the methods for the browse widget and their scope:
1This method applies only to combo-box browse columns.
2This method applies only to fill-in and combo-box browse columns.
EventsThe following table lists all the events for the browse widget and their scope:
See also
OpenEdge Release 10.2B
|