Styles properties

All selected styles and selected extended styles are collated and presented in the Selected Styles list box. Compulsory or "forced" DDT styles are always shown disabled (grayed).

Styles are selected by placing a check-mark in the check box to the left of each style, and can be subsequently removed by clearing the check box. It should be noted that some controls may have two or more styles that are mutually exclusive with each other. This means that the style list will contain a subset of two or more styles that will directly conflict when used at the same time.

For example, the caption text on a button control can be aligned to the left, to the center, or to the right edge of the button control, but you cannot align it to both the left and right sides, etc. While the mutual-exclusivity is obvious when it comes to the text alignment styles of a button, the problem is not always that clear. Further, the side effects of combining mutually exclusive styles are neither documented nor reliable.

However, to help reduce the risk of accidentally combining the most common mutually exclusive styles, PowerBASIC Forms arranges such styles into a group. The group uses a set of Option buttons (rather than check boxes) ensuring that only one style in the group can be selected.

Tip: When a style is highlighted in either of the style lists, the Properties dialog will display a brief description of the style in the lower-left corner of the dialog. This description can provide useful guidance when choosing style(s) for a control. Also see the Styles reference section.

Most dialog and control styles are visible in design mode but certain styles may only be fully visible in test mode and/or in the actual generated code.

For example, labels will not show the %SS_SUNKEN state in design mode and edit controls will not show the %ES_RIGHT style, but both are visible in test mode. Other styles, such as owner-drawn, are not displayed in either design or test mode, but display as non-owner-drawn (standard type) controls instead.

This is because honoring certain styles could result in the controls becoming completely invisible and/or non-selectable. Naturally, this could impact on the programmers ability to edit and test the dialog.

Also, in test mode, %WS_CHILD dialogs must be emulated by a %WS_POPUP dialog, otherwise the dialog would not be visible without a host (parent) dialog.

Favorite Styles

The default styles (that are used when adding a new control to a dialog) are determined by the Favorite Styles default setting. The "<Standard Styles>" option is the default selection until a change to the styles is made. Please note that in most cases, the Standard Styles selections are also the default DDT styles. The Favorite Styles feature can help ensure that all application dialogs are created with a consistent appearance.

The Favorite Styles for the Styles tab (and the Position and Size tab - see below) are designed to work the same way - you can create a new favorite styles list when the current settings for the tab differ from the currently selected favorite style list.

The Favorite Styles pop-up menu can be accessed by clicking on the pop-up button above and to the right of the Favorite Styles combo box, or by right-clicking the combo box itself. The menu items in this pop-up menu are disabled when they are not applicable. For example, you may only create a new favorite styles set when the current settings for the tab differ from the currently selected favorite styles set.

Once a favorite style set is created, you can easily select that favorite set to automatically change the styles (or position and size) of the current dialog or control using the drop-down listbox titled Favorite Styles.

Set As Default

If you set that favorite as the default by choosing Set as Default on the pop-up menu, then all newly created dialogs or controls of that type (class) will be given the styles indicated by the new default styles set. The default styles set is signified with a "<Default>" prefix.

Update 

The Favorites pop-up menu also includes an Update option. This updates the currently selected favorite style set, using the current style settings.

Rename and Delete

The Favorites pop-up menu also includes Rename and Delete options that rename and delete a favorite style set, respectively.

 

See Also

Dialog and control properties

General properties

Control Colors

Position and size properties

OK, cancel, and apply buttons