skip to main content
OpenEdge Development: AppBuilder
Frequently Used Dialogs : Text style selector and editor
Text style selector and editor
The button shown here is available in the property sheet of most widgets:
This button also appears in the Column Editor dialog box for data browser widgets, where you can set the font for column labels separately.
AppBuilder provides a fonts table similar in principle to its color table. Rather than specify each change of type style-font, weight and slant, point size, and attributes such as underlining on the fly, you define them in advance, with each definition occupying a slot in the fonts table. You then apply all characteristics at once by specifying a slot number.
As with the use of color, be sparing with font changes. Although at one time it was very common to use many sizes and styles of type in a single composition, today too many font changes can create an unfavorable impression on the user. Used carefully, special changes in the type can help focus the user's attention in a good way. Because of readability issues, fonts need to be selected with even more care than colors if they are to give the desired result.
Many companies use one or more particular fonts as part of their corporate identity program. If you are able to use those fonts too, without compromising readability, you might be able to gain a competitive advantage when marketing your software to such a company.
Type style selections apply to all text displayed in connection with a given widget. For example, you cannot choose one style for the column labels on a Browse widget and another style for the data it displays. Whatever style you select will be applied to both.
Choosing a type style
You can assign type styles on a per-widget basis. Each widget that displays text, whether as labels, data, or both, can have its own type style. Both labels and data will be displayed in the selected style; you cannot select one style for the labels and another for the data in AppBuilder. You can write code to do that if it is important to your design.
Generally speaking, you should choose the same style for most if not all of the widgets in your application. Make each extra type style count.
To assign a type style to a widget:
1. Open the property sheet for the widget. If the widget is being displayed and managed by a SmartObject, you must click the object's menu button and choose Edit Master to get access to that widget.
2. When the Property Sheet dialog box appears, click the type style button (the AAa icon). The Choose Font dialog box appears:
3. If necessary, click on the arrowhead buttons until the font sample you want to use is in view. Click it, and the thick outline appears, indicating selection.
4. Click OK to dismiss the Choose dialog box. Click OK to dismiss the property sheet. You should see your choice of type style reflected in the widget.
Defining a type style
Use the Choose Font dialog to define a type style.
To define a new type style or edit an existing one:
1. Open the property sheet for a widget. Click on the Type style button (the AAa icon). The Choose Font dialog box appears:
2. Unless you also want to change the font being used for the current widget, make a note of which slot is current so that you can restore it before you exit this font-editing session.
3. Slots 0 through 7 have predefined styles that are not editable. You can assign styles to slots 8 through 255. Click the right arrowhead button until slot 8 appears.
4. Double-click slot 8. The Font dialog box appears:
5. Choose a face, a weight and slant, a point size, and attributes (underline, etc.). Unless you are creating an application for a market that requires a special encoding (Greek, Cyrillic, etc.), be sure the Script setting is Western.
Caution: Remember that the fonts being presented to you by this dialog box are those you have installed on your development system. The fonts you choose here will not necessarily be available to the users of your application unless you provide them as part of your software distribution package. Unless you are prepared to do that, you should choose only those fonts that you know are supplied with the operating system.
6. Click OK to dismiss the Font dialog box. Your choices are reflected in the sample text in the slot. In this example, it shows the result of choosing 10 point Arial Bold with underlining:
7. Unless you want your definition discarded at the end of the current AppBuilder session, click Save Font Settings to make your definition permanent.
8. Click on the slot you noted in Step 2. If you want to change the type style for the current widget, click on that slot instead.
9. Click on OK to dismiss the Choose Font dialog box. Click on OK to dismiss the Property Sheet dialog box.