Progress
AppBuilder
Developer’s Guide
Configuring a SmartSelect Instance
The SmartSelect has a relatively complex Instance Properties dialog box:
![]()
Data Source
This section identifies the SmartDataObject that will feed the SmartSelect object. You cannot enter the filename of the SmartDataObject directly; AppBuilder fills in this field as part of creating the SmartLinks, once you place the SmartDataObject in the Viewer workspace.
You can subset the data that the SmartSelect displays. Type a subsetting expression—for example:
Credit–Limit > 10000
into the Filter field. The SmartSelect will then display only the subset of items that conform to that restriction.
Data
This section describes the field being replaced, and the identifying characteristics of its replacement:
- External Field — Identifies the field in the SmartDataViewer that you are replacing. This identification is read-only, supplied for your information only.
- Key Field — If the replacement data stream has more than one field, use this combo box to select the field that will appear in place of the original. Be certain to select the correct one.
For example, the State table in the sample database has three fields: State, State-name, and Region. If you use a SmartSelect fed from the State table to update the Customer.State field, the only correct choice for the key field would be State.State, since that is the related field. If you choose State-name or Region instead, confusion is almost certain to result, later.
- Displayed Field — If the replacement data stream has more than one field, use this combo box to select the field that the user will see. To continue the State example, you might prefer to display the more recognizable State-name field. That would be a more user-friendly choice than displaying the cryptic two-character post-office abbreviation from the State field itself, even though it is that two-letter code that you will store.
- Event on change — You can declare a name for the event to be experienced when the value of this field changes. This allows you to write an appropriate event-handling procedure. The name you define is local to the object. See the Progress ADM 2 Guide and the for further information.
- Edit Browser Columns — Active only when the field is to be represented as a Browse widget. Choosing this button opens the standard field-selection dialog box so that you can select the fields to be displayed.
Properties
This section presents three important behavioral properties:
- Enable — Normally set. Clearing this box prevents the SmartSelect from enabling itself even when the other fields of the SmartDataViewer enable themselves.
- Display — Normally set. Clearing this box prevents the SmartSelect from displaying data even when the other fields of the SmartDataViewer display data.
- Sort — Normally set. Clearing this box causes the items to appear in unsorted order. Normally the visible fields appear sorted on the Displayed Field.
Optional
This check box is normally cleared. Setting this box means that the associated field need not have a value.
You can specify the text that represents that nonvalue; the default is “<none>”. Note that this text does not necessarily appear at the top of your list of choices. If you wish it to appear as the first item in the list, you must either explicitly make it the first item in the source (for unsorted lists) or begin with some character, such as the angle bracket (<), that the sort operation will move to the top of the list.
Visualization
This section allows you to specify how the SmartSelect list will represent itself at run time. The choices are:
- Browser — The Browser representation is the best choice for handling lists that are known to be very large or are of unknown size. This representation initially appears in a closed state, under an iconic pushbutton next to the current value of the field:
![]()
Clicking the button opens the list of items as a Browse in a separate window. Click on the Edit Browser Columns button to choose what fields to display. Set the number of lines to display by entering an integer in the Inner Lines field.
- Combo Box — Default. This representation is configured as a Drop–down List by default. For a description of the three types of representation, see the "Combo Boxes" section in this chapter.
Set the number of lines to make visible in the list by entering an integer in the Inner Lines field.
- Selection List — Selection lists generally take up more space than combo boxes because you must specify their size at design time. Note that setting the Inner Lines field property has no effect on the visible size of the widget. You must resize it manually by dragging the handles.
- Radio Set — Best suited to very small, fixed-size data sets that can be represented as short labels. You can specify a vertical (default) or horizontal orientation.
Displayed Field Attributes
Specify the characteristics of the field you display as a prompt to the user:
- Label — Specify the label, if any, to display with the SmartSelect. The SmartSelect object does not inherit the label of the SmartDataViewer field it replaces. You can set the Data Source check box to use the schema name of the field, or type in a label of your choice.
- Browse title — Active only when Browse is the representation type. You can set the title string that the Browse widget will display.
- Datatype — Read-only. Displays the underlying data type of the displayed field from the schema definition.
- Format — Displays the field descriptor from the schema definition. Clear the Data Source check box if you have reason to modify this descriptor.
- Tooltip — Enter the string the SmartSelect will display as the MS-Windows Tooltip.
- Help ID — If you will offer context-sensitive help for this object, enter a unique integer identifier here.
Geometry
Displays the origin and size of the SmartSelect representation in character units. You can set these values here, or in pixel units in the Advanced Properties dialog box.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |