Progress
ADM 2 Guide
SmartSelect Instance Properties
Figure 2–15 shows the default instance property dialog box for a SmartSelect (different properties are enabled or disabled if you reset the View–as property).
Figure 2–15: SmartSelect Instance Properties Dialog Box
![]()
The instance properties in this dialog box are grouped into the following panes of related properties:
You use these instance properties as described in the following sections.
Data Source Pane
You use the instance properties in the Data Source pane to get and specify information about the SmartDataObject that is the data source for the SmartSelect:
- SmartDataObject—Shows the name of the SmartDataObject that serves as the SmartSelect’s data source. This field is populated by dropping a SmartDataObject into the associated SmartDataViewer and linking it to the SmartSelect with a Data SmartLink.
- Filter—Specifies an optional filter for the SmartDataObject; for example, an expression such as the following:
Note that you can specify the filter only as a hard-coded value; you cannot specify variables.
- Instance Properties—Opens the instance property dialog box for the SmartDataObject identified by the SmartDataObject property.
Data Pane
You use the instance properties in the Data pane to define the field that the SmartSelect represents.
- External Field—A nonupdateable field in the SmartDataViewer that displays the SmartDataObject field that the SmartSelect represents. This field is populated when you drop the SmartSelect onto a SmartDataViewer’s field.
- Key Field—A combo box in which to specify the SmartDataObject field that maps to the SmartDataViewer field that the SmartSelect represents. When the SmartSelect’s instance property dialog box first appears, this property automatically displays any SmartDataObject field whose name matches the name of the SmartDataViewer field.
- Display Field—A combo box in which to specify the SmartDataObject field to display. All of the SmartDataObject’s fields are available in the combo box.
- Event on change—Enter an event to PUBLISH if the value of the displayed field changes. For more detailed information on using this property (including an example), see the "Event on Change Instance Property" section in the "SmartSelect Usage Notes" section.
- Edit Browse Columns—Enter the fields to display in a browse if the View–as property is set to Browser. (See the "Visualization Pane" section.) If View–as is set to Browser and you do not specify any browse columns, the browser displays the key field and the display field. This button is enabled only when the View–as property is set to Browser.
Properties Pane
You use the instance properties in the Properties pane to specify whether the SmartSelect is enabled and when and how it displays data:
- Enable—If checked (the default), enables the SmartSelect for use when the containing SmartDataViewer is also enabled for use.
- Display—If checked (the default), the SmartSelect displays data when the containing SmartDataViewer is displayed.
- Sort—If checked (the default), specifies that the SmartSelect data is sorted on the displayed column.
- Exit Browser on Default Action—This field is enabled only when View–as is set to Browser. It controls whether the SmartSelect browser exits (closes) when the application user selects a row. If unchecked (the default), the browser stays open until it is explicitly closed, otherwise it exits as soon as the application user selects a row.
- Cancel on Exit of Browse—This field is enabled only when View–as is set to Browser. It controls whether exiting (closing) the browser is considered a selection. If unchecked (the default), exiting behaves as a selection, otherwise it does not.
NOTE: Leaving this option unchecked minimizes performance overhead. (The amount of performance overhead varies depending on how much data there is and where it is.) However, in some circumstances, your application will work correctly only if you check this option; for example, if the Data-Source linked to the containing SmartDataViewer is linked to other objects that must reflect changes in the SmartSelect.- Reposition Data Source—Controls whether the Data-Source linked to the SmartDataViewer that contains this SmartSelect repositions itself to the record that corresponds with the selected value whenever the value in the SmartSelect changes. If unchecked (the default), the Data-Source does not reposition itself, otherwise it does reposition itself. The default behavior is the implicit behavior for a browser, so this field is disabled when View–as is set to Browser.
Optional Pane
You use the instance properties in the Optional pane to manage the display of no value in the SmartSelect:
- Optional—If checked, indicates that displaying a value in the SmartSelect is optional. This allows the SmartSelect to display no value (represented by the unknown value).
- No Value—Enter a value to be displayed when no value (the unknown value) is selected. This field is enabled only when Optional is checked.
Visualization Pane
You use the instance properties in the Visualization pane to manage the visualization of the SmartSelect:
- View–as—A combo box in which to select the type of control used to visualize the SmartSelect. The choices are Browse, Combo–box, Selection–list, and Radio–set.
If you select Browse, the containing SmartDataViewer displays the SmartSelect as a field with a button that, when pressed by the application user, starts a separate window with a browser that displays the SmartSelect data. This browser shows the number of lines specified by the Inner Lines property and presents the application user with a search field in which to search on the field specified by the Display Field property. (See the "Data Pane" section.) The application user selects a row either by double-clicking or by pressing the Return key or its equivalent.
If you select Combo–box, a radio–set appears from which you can select a combo box type: Drop–down–list, Drop–down or Simple (these are the three types of Progress combo boxes).
If you select Radio–set, a radio set appears from which you can select an orientation: horizontal or vertical.
- Inner Lines—Specifies the number of lines used to display data in the SmartSelect. This option is disabled if you select Radio–set.
Field Attributes Pane
You use the instance properties in the Field Attributes pane to specify labeling and formatting information for the SmartSelect field:
- Label, Data Source—The Label fill-in field displays the label of the SmartSelect field. By default, the AppBuilder uses the label from the data source and disables this field. To enable the Label field so that you can enter your own label, uncheck the associated Data Source check box.
- Browse Label—Enter a title for the browse window if the View–as property is set to Browser. (See the "Visualization Pane" section.) This field is enabled only when the View–as property is set to Browser.
- Data Type—The data type of the SmartSelect key field (this field is read only).
- Format, Data Source—The Format fill-in field displays the format of the SmartSelect key field. By default, the AppBuilder uses the format from the data source and disables this field. To enable the Format field so that you can enter your own format, uncheck the associated Data Source check box. This is field is enabled only if you select Combo–box as the value of View–as.
- Tooltip—Enter the text of the Tooltip for this field. There is no default.
- Help ID—Enter the context ID for the relevant help topic. There is no default.
Geometry Pane
You use the instance properties in the Geometry pane to alter the SmartSelect’s size and position. Note that you can also modify the SmartSelect’s geometry by directly manipulating the SmartSelect in the SmartDataViewer Container:
Define Any Key Trigger on Field Pane
- Define Any Key Trigger on Field—This field is enabled only when View–as is set to Browser. It controls whether a persistent trigger is defined on the ANY–KEY event of the field. If it is checked (the default), the trigger is defined.
The main use for a persistent trigger on the ANY–KEY event is to start the SmartSelect’s browser as specified in the Browse Keys instance property’s fill-in field. The procedure that runs on this event is the anykey procedure; however, you can have other keys perform actions in the data–source by overriding the anykey procedure in a customized SmartSelect super procedure (
adm2/custom/selectcustom.p
). For example, you do this to implement combo-box behavior such as navigation on cursor keys.See the “Custom Class Files” and “Writing Super Procedures” sections in "Developing ADM Extensions," for a description of custom files and information on customizing super procedures, respectively.
- Browse Keys—Specifies the key label or key function that starts the SmartSelect’s browser from the field. You can supply a comma-separated list.
- Key—A button that opens the Keyboard Event dialog box, shown in Figure 2–16:
Figure 2–16: Keyboard Event Dialog Box
![]()
This dialog box traps a key function or key label and returns the value to the fill-in field for the Browse Keys instance property. You can append the selected value to the current value by inserting a comma after the existing value before you press the Key button. Note that this dialog box cannot distinguish between key functions and key labels.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |