Progress
AppBuilder
Developer’s Guide
Configuring SmartDataBrowser Properties
SmartDataBrowsers have properties associated both with their Browse component and with their nature as a procedure-based object. You can make a number of changes to those settings, if the default values do not meet your needs.
To open the property sheet associated with the Browse component, follow these steps:
Minimal Configuration
Although you can accept many of the default settings, you might wish to make two changes to individualize the object. Note that these changes will apply to all created instances:
Query and Fields
Since the SmartDataBrowser uses the data stream from a SmartDataObject, you can change only the fields and their ordering. The Query button is disabled because the query belongs to the SmartDataObject, not the Browse widget:
CAUTION: If you lock more columns than will fit in the Browse’s viewable width, you effectively disable the horizontal scroll bar, because all scrolling will take place out of sight to the right.
- Choosing the Fields button starts Column Editor and allows you to modify the columns this SmartDataBrowser will display. For information about how to use Column Editor, see the "Selecting Database Fields for Browsing" section in Data-access Objects."
- 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.
- 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. The larger the number of lines, the smaller the thumb. However, that thumb size is based on the number of records being batched by the SmartDataObject, not on the total number in the stream. In general, the total number of records in the stream will be larger. When that is the case, the system cannot correctly size the thumb.
If you can predict, even approximately, the total number of records in the 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 SmartDataBrowser.
Geometry
You can set the exact origin and size of any SmartDataBrowser instance created from this master. 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 prefer to use pixels rather than character units, choose the Advanced button and set the values in that dialog box instead.
Miscellaneous Properties (Other Settings)
You can make a number of changes to the appearance and behavior of the Browse component of the SmartDataObject master, if the default settings do not meet your needs:
- Column Scrolling — Normally set. Clearing this check box causes the horizontal scrolling granularity to be one character. The default is one field (column). This option applies only when running under MS-Windows.
- Drop Target — Normally cleared. Setting this check box causes the system to generate an event when the user drags and drops another object onto this one. You must write code to deal with that event.
- Enable — Normally set. Clearing this check box causes the entire widget to be insensitive.
- Expandable — Normally set. Clearing this check box prevents the last column from stretching to cover any background exposed by scrolling. When Column Scrolling is set, and the Browse window is scrolled all the way to the right, some background will generally be exposed because it is unlikely that the last n columns will exactly fit the Browse width. When this option is set, the last column is expanded cosmetically to the right to mask any exposed background from view. This option applies only when running under MS-Windows.
- Hidden — Normally cleared. Setting this check box prevents implicit display of the object.
NOTE: Multiple Selection is not supported by the ADM. If you wish to use this option, you will have to write code to manage and communicate the multiple values as a special case.- Multiple Selection — Normally cleared. Setting this check box allows the user to select multiple rows. If any of the fields are updatable, you must also clear the No Row Markers check box.
- No Assign — Normally set. When cleared, any changes to updatable fields are automatically written back to the database when the user moves to a different row (record).
- No Auto-Validate — Normally set. Clearing this box causes the interpreter to automatically run validation checks.
- No Box — Normally cleared. Setting this check box causes the Browse window to display without a border. Under MS-Windows, this border is a single-pixel line.
- No Labels — Normally cleared. Setting this check box prevents display of the column labels.
- No Tab Stop — Normally cleared. Setting this check box removes the SmartDataBrowser from the applicable TAB-traversal list. Under MS-Windows, removing the object from the traversal list has some effects that might confuse the user.
- No Validate — Normally cleared. Setting this check box disables all validation conditions specified in the Data Dictionary for fields in this SmartDataBrowser.
- Open the Query — Normally cleared. Setting this check box activates the query and populates the fields during initialization. In a SmartDataBrowser, this option has no effect.
- Scroll bar Vertical — Normally set. Clearing this option hides the vertical scroll bar. The user can still scroll using the arrow keys. If you use a SmartPanel for navigation with this SmartDataBrowser, you should probably clear this box to avoid confusion.
- Separators — Normally set. Clearing this check box causes the widget to paint itself without lines separating the rows and columns. When this box is set, the Colors selector (see the "Colors Selector and Editor" section in "Frequently Used Dialogs") offers you the option of selecting a special color for the separator lines.
- Title Bar — Normally cleared. Setting this check box causes the Browse widget to display a full-width Frame-like title bar. Specify the title string if you set this option.
Advanced Properties
Choose the Advanced button. The Advanced Properties dialog box will open:
![]()
You can make a number of changes to the SmartDataBrowser’s appearance and behavior by changing the default settings in this dialog box:
- Help — Text in this field displays in the status bar of the parent window when the SmartDataBrowser has the focus. If the parent window has no status area, this text will not display.
- Private Data — AppBuilder writes out the contents of this field as the value of the object’s PRIVATE-DATA attribute. You can write code to read and operate on that value in any way that meets your needs.
- Generated Code Layout Unit — Controls whether AppBuilder describes the position and size of this SmartDataBrowser in character or pixel units when it generates source code.
- Geometry — 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 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.
- 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 box in read-only Browsers allows the user to search in an individual field across all records. Updatable Browsers allow such searching by default.
The search is started by clicking the desired column title and typing the letter for which to search. No prompt appears for the letter. The Browser scrolls its window to bring into view and make current the next record, if any, in which the search field data begins with the typed-in letter.
- Movable — Normally cleared. Setting this check box and the Selectable check box allows the user to move the entire SmartDataBrowser object around within the bounds of the enclosing Frame.
- Resizable — Normally cleared. Setting this check box and the Selectable check box allows the user to change the size of the SmartDataBrowser 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 user to select the SmartDataBrowser object.
Procedure Settings
See the "Procedure Settings" section in "Frequently Used Dialogs."
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |