Use the Properties Window to change a display type
- Last Updated: January 16, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Normally, the Properties Window is an alternative way to set field attributes, instead of just using the AppBuilder property sheet dialog boxes. The main advantage of using it is that you can set common field properties for multiple fields at a time, as you saw earlier.
But in this case, the only way to change the display type of a field after you dropped it onto the design window is in the Properties Window. The AppBuilder property sheets for different display types are different, so you cannot actually change the display type from the property sheet. But now that you changed the display type in the Properties Window, you can set its editor-specific attributes.
To open the editor’s property sheet and set attributes:
- Double-click on the editor field to open the property sheet.
- Check the toggle boxes for these attributes:
- Enable — Even though you will not allow the user to change the value, checking on this toggle box makes the contrast between the displayed text and the background greater, so the text is more readable. This is an important consideration since, depending on the color combinations, it is possible wind up with a disabled editor with text that is gray on gray and therefore invisible!
- Read-Only — This option keeps the value from being changed even though it is displayed as enabled.
- Scrollbar-Vertical — This option gives you a scrollbar on the right-hand side of the editor if the value gets too long to display. This is another reason to mark the editor as Enabled. If it is not, then the user cannot use the scrollbar.
- Word-Wrap — This option wraps whole words from one line to the next, rather than extending the text off the editor to the right. You should normally select this option if you use a vertical scrollbar.
- Click OK to exit the property sheet.
- Resize the editor as you like, to have multiple lines of display.
- Run the window and click the Next button to see what happens.
The Comments field value is displayed properly for the first Customer, but it does not change when you click the Next button. What went wrong? The AppBuilder regenerated the enable_UI procedure with its field list, to include the Comments field in its initial display. But the trigger blocks on the four buttons is code you copied from enable_UI earlier, so it did not get changed automatically.
You do not want to have to keep editing this field list, so you are better off
substituting the preprocessor value that the AppBuilder keeps up to date as the field
list changes. This is the DISPLAYED-FIELDS preprocessor.
The next section describes how to use the Section Editor to go into
each of the four button triggers, remove the field list from the
DISPLAY statement, and substitute the preprocessor value for
it.