Add dynamic objects to a window
- Last Updated: May 3, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
To see dynamic objects in action, you can add a few to the test window. The goal is to let the user select one or more fields from the OrderLine table to display alongside the Order browse. Because these fields are the user’s choice at run time, they are dynamic fill-ins.
To add dynamic objects to the sample window:
- Open the h-CustOrderWin7.w test window in the AppBuilder. Widen it somewhat to make room for some additional objects.
- Pick the Selection List object from the Palette.
- Drop the Selection List onto the window to the right of the Customer fields.
- Double-click on the Selection List to bring up its property
sheet:
- Name the object OlineFields.
- Check on the Multiple-Selection toggle box. This option allows the
user to select more than one entry from the object at run time.
Notice that there is a choice between List-Items and List-Item-Pairs in the property sheet. Selection lists and combo boxes provide this choice. If you set up the object to use List-Items, then the values displayed and selected in the object are the actual values stored in the field in the underlying variable or database field. In this case, the initial value of the object, which establishes the list of choices, is a simple comma-separated list of those values. If you set up the object to use List-Item-Pairs, then the values displayed are paired with another set of values that are the ones actually stored in the variable or field. In this case, the initial value of the object is a comma-separated list of alternating displayed and stored values. You use this option if the value stored is a coded value that is not meaningful to the user, and the user should instead choose from a more meaningful set of labels for those values. In this case, the default choice of List-Items is appropriate. Instead of setting the list as its initial value in its property sheet, you establish the list of OrderLine fields at run time.
- Click OK to save your changes to the property sheet.
- Select the Text object from the Palette,
drop it onto the window above the selection list, and give it a value of
Show OrderLine Fields: