skip to main content
OpenEdge Development: AppBuilder
Data-Display/Capture Objects : Basic data browsers
Basic data browsers
In addition to the SDB, AppBuilder supplies the basic ABL data browser (Browse widget), with its built-in query feature. Like the SDB, a basic data browser presents the results of a query in simple row/column tabular format. Each row displayed in a Browse always represents one record from the data stream. Each column represents one of the fields in the records. The browse object can display any of the standard data types that can be represented by ASCII text.
Unlike an SDB, the basic browse object manages its own data stream, communicating with the data source on its own behalf rather than tapping into the data stream supplied by a modular data pump such as the SDO.
Although you can freely place a basic browse object in a smart workspace, for example a SmartWindow, doing so will not enable it to take advantage of SmartLinks or participate in ADM paging.
Creating a basic data browser instance
Unlike an SDB, a basic browse object has no master, and obtains its data stream directly using its built-in query feature. Although there is no master to define, you must define that query.
To create and place a basic Data Browser:
1. Click on the basic Browse tool icon in the Object Palette. Click on a bare spot in your workspace to place it.
2. Query Builder immediately opens. Define the query. See the “Defining and editing queries using Query Builder” section for more information. This version of the Query Builder includes a Fields button to allow you to choose specific fields from the table.
Note: While you can elect to jump out of Query Builder and create a free‑form query, you cannot later use Query Builder to maintain it. Confirming that you wish to create a free‑form query locks out Query Builder immediately; you cannot change your mind. Your only recourse will be to delete the Browse object altogether and create a new one.
3. When you have defined the query terms and chosen the fields the browse will display, click OK to dismiss Query Builder. Your browse widget displays the fields you have chosen.
4. Select the browse, if necessary, and drag the handles to resize and position it to meet your needs. Note that the browse does not display a horizontal scroll bar as long as it has enough space to display at least a fragment of the rightmost field. Check to be sure it displays the whole field.
Configuring a basic data browser instance
You can make a number of changes to the appearance and behavior of your basic Browse object, if the default settings in the property sheet do not meet your needs.
Click on the object to select it, if necessary, and choose ToolsProperty Sheet. The Property Sheet dialog box appears:
Minimal configuration
Although you can accept many of the default settings, you might want to make two changes to individualize this object:
*Change the identifier to more closely reflect this data browser’s role in your application.
*Add a title string, if you plan to allow the browse to display a title bar.
Query and fields
If the Query and Fields buttons are visible, it means you can edit those elements using Query Builder and Column Editor rather than the Section Editor. If the buttons are not visible, you must use the Section Editor, and the balance of this section does not apply to this browse.
Since the query is local to this browse, rather than in a separate module, you can make changes both to the terms of the query and to the fields the browse will display.
*Choosing the Query button will start Query Builder and allow you to modify the terms of the query. See the “Defining and editing queries using Query Builder” section for more information.
*Choosing the Fields button will start Column Editor and allow you to modify the columns this SDB will display. For information about how to use Column Editor, see the “Selecting database fields for browsing” section.
*By default, all columns can be scrolled horizontally, if there are too many columns to display at once. You can choose to lock the leftmost columns in place, so that scrolling does not affect them. Enter in the Locked Columns box the number of columns you want to freeze in place.
Caution: If you lock more columns than will fit in the browse’s window, you effectively disable the horizontal scroll bar.
*When displaying a vertical scroll bar, the system tries to size the scroll bar’s thumb slider to reflect the total number of lines in the data stream. Ideally, the size of the thumb varies inversely with the number of lines (records). In general, the number of records being returned by a query will be larger than the number of lines that can be buffered and, when that is the case, the system cannot begin to correctly size the thumb. If you have a good idea about the total number of records in this data stream, you can improve the accuracy of the scroll bar’s appearance. Enter your estimate in the Max Data Guess field.
*Type into the Tooltip field the identifying text that you want the system to display whenever the mouse cursor hovers over this browse.
You can set the exact XY origin (relative to the containing frame) and size of this browse instance. Set the values, in character units, in the appropriate fields. You can choose whether the origin is measured at the upper‑left corner (the default) or the upper‑right corner.
If you would prefer to use pixels rather than character units, click Advanced and set the values using that dialog box instead.
For more information on all the settings on the property sheet, see the online help.
Advanced properties
Click Advanced. The Advanced Properties dialog box appears:
You can make a number of changes to the browse’s appearance and behavior by changing the default settings in this dialog box, as follows:
*Help — The text in this field is displayed in the status bar of the parent window when the Browse has the focus. If the parent window has no status area, this text never displays.
*Private Data — AppBuilder writes the contents of this field out as the value of the PRIVATE-DATA attribute. You can write code to use this data in any way that meets your needs.
*Generated Code Layout Unit — Controls whether AppBuilder describes the position and size of this Browse in character or pixel units, when it generates source code.
*Geometry - Pixels — Expresses the origin and size of this widget in pixels. You can set a particular origin and size for the object here rather than interactively, if you wish. You can also choose to have the origin be measured at the upper‑right rather than the upper‑left corner.
*Column Movable — Normally cleared. Setting this check box allows the user to reorder the columns by dragging. Such reordering is cosmetic and has no effect on the actual record.
*Column Resizable — Normally cleared. Setting this check box allows the user to resize the columns interactively. Resizing the column has no effect on the actual field widths.
*Column Searching — Normally cleared. Setting this check box allows the user to search on a selected column (field).
*Movable — Normally cleared. Setting this check box, together with the Selectable box, allows the user to move the entire browse object around within the bounds of the enclosing frame.
*Resizable — Normally cleared. Setting this check box, together with the Selectable box, allows the user to change the size of the browse object, within the limits of the enclosing frame.
*Row Resizable — Normally cleared. Setting this check box allows the user to change the vertical size (height) of the rows by dragging a horizontal separator line.
*Selectable — Normally cleared. Setting this check box allows the use to select the browse object.