Styles

You can create and manage style sheets and styles to provide consistent formatting within a single form or across multiple forms. For example, you can control the look of caption and field value text, the appearance of object borders and background colors, as well as the size and style of radio buttons and check box objects.

You use the Style Catalog to manage styles sheets, and to edit and apply styles to objects in a form design. The Style Catalog lists the various style sheets available with a form and the styles included with each style sheet. The Style Catalog organizes the style sheets into different panels, one for each style sheet. The first panel is for the internal style sheet, which is embedded within the form. Below the internal style sheet panel are panels for each external style sheet (Designer Style Sheet.xfs) that you add to the Style Catalog. Each panel bar shows the name of the style sheet. If you hover the mouse over the panel bar, the location of the style sheet is displayed in a tooltip. Menus are also available on each panel bar and a context menu is available with each listed style. Additional commands are available on the Style Catalog menu.

An internal style sheet is automatically associated with each new form you create. The internal style sheet is useful when you are creating a single form and you want the style sheet and styles embedded in the form for easy editing. However, if you are creating more than one form design, you can create multiple external style sheets in Designer, and add them to any number of form designs.

You can extract the styles from the internal style sheet to a new external style sheet for use in other forms. Alternatively, you can add the styles in various external style sheets to the internal style sheet by embedding the external style sheets within the form design.

Also, using options in the Form Properties and Options dialog boxes, you can specify default fonts for captions and values in new or existing forms to quickly change the fonts for all form objects.

To sort the style sheets in the Style Catalog

The Style Catalog organizes style sheets into different panels, one for each style sheet. The first panel is for the internal style sheet. Below the internal style sheet panel are panels for each Designer Style Sheet file (XFS) file that you add to the Style Catalog.

By default, Designer arranges the style sheets in the order they are added to the Style Catalog. You can resort the external style sheet files list in the Style Catalog by name or by type of style sheet.

On the Style Catalog palette menu, point to Sort, and then perform one of the following actions:
  • To sort the list of style sheets by name, click Name.

  • To sort the list of style sheets by type, click Type.

  • To unsort the list of style sheets, click Unsort.

To select a default style sheet for new forms

You can select an Designer Style Sheet (XFS) file for ne w forms. When you create a new form, the selected XFS file appears in the Style Catalog ready for use.

  1. Click Tools > Options.

  2. Select the Formatting panel.

  3. Select Use Style Sheet.

  4. Click the browse button, and select the Designer Style Sheet (XFS) file to use.

To add a style sheet to a form

You can add one or more Designer Style Sheet (XFS) files to a form. After you add a new style sheet, the Style Catalog displays a new panel listing the styles that are available for use in the form.

You can add the styles in the XFS files listed in the Styles catalog to the internal style sheet, by embedding the styles in the form. See To embed a style sheet .

You can hover the mouse over the panel toggle bar, to display the location of the style sheet.
  1. Select Windows > Style Catalog.

  2. On the Style Catalog palette menu, click Add style sheet.

  3. In the Open dialog box, navigate to and select the Designer Style Sheet (XFS) file to use.

  4. Click Open.

To create a new style sheet

When you create a new style sheet, Designer opens a blank Designer Style Sheet (XFS) file in which to create new styles. Designer displays style sheets using a different background color than forms to distinguish them. In the Hierarchy palette, the top-level subform is named Style sheet.

  1. Click the Style Catalog menu, and select New Style Sheet.

  2. Name and save the style sheet file.

To embed a style sheet

You can embed the styles from any number of Designer Style Sheet file (XFS) files within a form design, for ease of editing.

When you select the Embed Style Sheets command, Designer adds the styles from all of the external style sheet panels in the Style Catalog to the internal style sheet panel. Any references from form objects or default styles are reset to the new internal styles and the references to the external style sheets are removed from the form.

The Embed Style Sheets command is available when the Style Catalog contains one or more external style sheets.

  1. Click the Style Catalog menu.

  2. Select Embed Style Sheets.

To extract styles to a new style sheet

You can extract the styles from the internal style sheet to a new Designer Style Sheet file (XFS). You can also replace the internal style sheet with a reference to the new external style sheet, when needed.

  1. Click the menu on the Internal style sheet panel.

  2. Select Extract Styles To A New Style Sheet.

  3. In the File Name box, enter a name for the new style sheet file.

  4. (Optional) Select Replace Internal Style Sheet With Reference To The New External Style Sheet.

  5. Click Save.

To remove a style sheet

You can remove an external Designer Style Sheet file (XFS) from the Style Catalog at any time.

The Style Catalog organizes the style sheets that are available with a form into different panels. The first panel is for the internal style sheet. You cannot remove the internal style sheet. Below the internal style sheet panel are panels for each Designer Style Sheet file (XFS) referenced by the form.

  1. Click the menu on the panel of the external style sheet you want to remove.

  2. Click Remove Style Sheet.

To replace a style sheet

You can replace any Designer Style Sheet file (XFS) in the Style Catalog at any time. The Style Catalog organizes the style sheets that are available with a form into different panels. The first panel is for the internal style sheet. You cannot replace the internal style sheet. Below the internal style sheet panel are panels for each Designer Style Sheet file (XFS) referenced by the form.

Note: If the style names are the same in two different style sheets, when you replace the one style sheet with the other, the objects in the form are automatically updated with the style properties from the replacement style sheet.
  1. Click the menu on the panel of the external style sheet you want to replace.

  2. Click Replace Style Sheet.

To edit a style sheet file

You can edit the styles in an external Designer Style Sheet file (XFS). You do not need to add a style sheet file to the Style Catalog to edit it.

  1. To open a style sheet for editing, do one of the following actions:

    • If the style sheet file is in the Style Catalog, click the menu on the style sheet panel you want to edit, and then click Edit Style Sheet. Designer opens the style sheet file.

    • If the style sheet is not in the Style Catalog, click File > Open to select and open the file in Designer. Designer adds the styles to the Internal Style Sheet panel.

  2. In the Style Catalog, right-click the style to edit, and select Edit Style.

  3. In the Style Editor, change formatting options as needed.

  4. Save a close the style sheet file.

Create a new style from an object

You can create a new style from an object in an external Designer Style Sheet file (XFS).

  1. Click the menu on the external style sheet panel you want to use to create the new style.

  2. Select Edit Style Sheet.

  3. On the Design View tab, right-click the object to use to create the new style, point to Styles, and then click Create New Style From Object.

  4. In the Style Editor, name the style and select formatting options as needed.

  5. Click OK.

  6. Save changes and close style sheet file.

Creating a new style for an object type

You can create new styles in the internal style sheet of a form design, or in an external Designer Style Sheet file (XFS) file.

When creating a style for an object with caption, value, or border formatting, you can select an existing style of the same object type or of the Common Style type from which the new style can inherit the properties specified in the style sheet.

After you create the new style, it appears in the Style Catalog.

To create a new style in the internal style sheet

You create a new style for the internal style sheet within the current form design.

  1. Click the menu on the internal style sheet panel.

  2. Select Create New Style. The Style Editor dialog box is displayed.

  3. Select the General panel.

  4. In the Style Name box, type a name for the style.

  5. In the Type list, select the object type you want to create a style for.

  6. Select formatting options as needed, and then click OK.

  7. Save changes and close the style sheet file.

To create a new style in an external style sheet file

To create a new style in an external Designer Style Sheet file (XFS), open the style sheet file in Designer and create styles in that file.

  1. Click the menu on the external style sheet panel to which you want to add a style.

  2. Select Edit Style Sheet.

  3. In the Style Catalog, right-click the style to edit, and select Create New Style. The Style Editor dialog box is displayed.

  4. Select the General panel.

  5. In the Style Name box, type a name for the style.

  6. In the Type list, select the object type you want to create a style for.

  7. Select formatting options as needed, and then click OK.

  8. Save changes and close the style sheet file.

Creating a common style

A common style is a generic style type, which can be referenced by any object type. As a result, you can define a single common style with properties, which can be inherited by all other object types. By default, a common style defines caption text formatting, value text formatting, and border properties. You can choose to define only text formatting properties or only border properties.

To create a common style in the internal style sheet

You create a common style for the internal style sheet within the current form design.

  1. Click the menu on the internal style sheet panel.

  2. Select Create New Style. The Style Editor dialog box is displayed.

  3. Select the General panel.

  4. In the Style Name box, type a name for the style.

  5. In the Type list, select Common Style.

  6. Select formatting options as needed, and then click OK.

  7. Save changes and close style sheet file.

To create a common style in an external style sheet file

To create a common style in an external Designer Style Sheet file (XFS), open the style sheet file in Designer and create the common style in that file.

  1. Click the menu on the external style sheet panel in which you want to create a common style.

  2. Select Edit Style Sheet.

  3. Click the menu on the internal style sheet panel.

  4. Select Create New Style. The Style Editor dialog box is displayed.

  5. Select the General panel.

  6. In the Style Name box, type a name for the style.

  7. In the Type list, select Common Style.

  8. Select formatting options as needed, and then click OK.

  9. Save changes and close the style sheet file.

To apply a style to an object

The Style Catalog lists the styles that are available with each style sheet. Each style in a style sheet is associated with a particular object type. You can apply a style to the same object type. For example, you can apply a Text Field style to a Text Field object. If the style you want to apply is not compatible with the selected object, the Apply Style command is unavailable.

You can also create common styles with properties that you can apply to all object types. See Creating a common style .

  1. On the Design View tab, select the object type you want to apply a style to.

  2. In the Style Catalog, right click the style you want to apply.

  3. Click Apply Style.

To remove a style from an object

You can remove a style directly from an object on the Design View tab.

  1. On the Design View tab, select the object you want to remove a style from.

  2. Right-click, and select Styles > Remove Style.

Editing a style

You can edit styles in the internal style sheet of a form design, or in an external style sheet that references an Designer Style Sheet file (XFS). You edit the styles in an internal style sheet in the current form design. You edit the styles in an external style sheet, by opening the XFS style sheet in Designer. When you edit a style sheet file in Designer, the page background (in the Design view) is colored to differentiate it from the white background used for form designs.

With the internal style sheet, changes are immediately applied to all objects that use that style. With external style sheet files, the chances are applies when you save the form.

To edit a style in the internal style sheet

  1. In the Style Catalog, expand the internal style sheet panel.

  2. Right click the style you want to edit, and select Edit Style.

  3. In the Style Editor, select options as needed, and click OK.

  4. Saves the changes.

To edit a style in an external style sheet file

  1. To open the style sheet file for editing, do one of the following actions:

    • If the style sheet file is in the Style Catalog, click the menu on the external style sheet panel to edit, and then click Edit Style Sheet. Designer opens the style sheet file.

    • If the style sheet is not in the Style Catalog, click File > Open to select and open the style sheet file in Designer.

  2. In the Internal Style Sheet panel, right click the style you want to edit, and click Edit Style.

  3. In the Style Editor, select formatting options as needed, and click OK.

  4. Save the changes.

Deleting a style form a style sheet

You can delete a style from the internal style sheet of a form design, or from an external style sheet that references an Designer Style Sheet file (XFS). You delete styles directly from the internal style sheet of a form design. You delete the styles from an external style sheet, by opening the XFS style sheet in Designer.

To delete a style from the internal style sheet

  1. In the Style Catalog, expand the internal style sheet panel.

  2. Right click the style you want to delete, and select Delete Style.

  3. Click Yes to confirm that you want to delete the style.

To delete a style from an external style sheet

  1. In the Style Catalog, click the menu on the external style sheet panel.

  2. Select Edit Style Sheet. Designer opens the style sheet file, temporarily removes the associated panel from the Style Catalog, and adds the styles to the internal style sheet panel.

  3. In the internal style panel, right click the style you want to delete., and click Delete Style.

  4. Save the changes and close the style sheet file. Designer moves the remaining styles from the internal style sheet panel back to the external style sheet panel.

To set a default style for new objects

You can select default styles for new objects from any style sheet in the Style Catalog. You can select a default style for most objects in the Object Library. The default styles you select for an object type are shown in the Style Catalog in bold italic text.

When the Apply Default Styles To New Forms option is selected and you add a new object to a form, Designer automatically applies the default styles for that object type to the new object.

  1. In the Style Catalog, right click the object style you want to set as a default.

  2. Click Set As Default Style.

To apply default styles to new objects

Before you can apply default styles to new objects, select a default style for each object type you add to your form design.

  1. Click the Style Catalog menu.

  2. Select Apply Default Styles To New Objects.

To edit default styles for new objects

You can change or clear the default styles for new objects.

  1. Click the Style Catalog menu.

  2. Select Edit Default Styles Settings.

  3. Click the list next to the objects you want and do one of the following actions:

    • To clear the default style, select None.

    • To change the default style, select a substitute style.

// Ethnio survey code removed