Working with Text Properties

Now that you have learned about the properties of forms, you need to learn about the properties of various objects on forms. The good news is that although a lot of different objects can be placed on a form, a properties box is available for each. All the settings are in one place, and you don't have to access the menu to change any of them. They are context sensitive, and as you move from one object to another, the properties box changes to display the properties for that object. Properties boxes float and can be minimized and parked out of the way. When you learn how to use the properties boxes, you will have little trouble with them.

Perhaps the most common object on a form, except for fields, is text. Text is used to label fields and provide document titles, section titles, and other information. The Text properties box is used to set text attributesand it is exactly the same properties box used for text in documents. The Text properties box has several tabs; from left to right, they are Font, Paragraph Alignment, Paragraph Margins, Paragraph Border, Paragraph Hide When, and Paragraph Styles. Each of these tabs is discussed in the following sections.

Using Font, Alignment, Margins, and Border Settings

The first four tabs enable you to set some basic text properties. The first tab is the Font tab, which is shown in Figure 4.15. On this tab, you can set the font type (also known as font face ), size, style, and color. The default font type in Designer 6 is Default Sans Serif. You can also set the text size (the default is 10 points), color (the default is black), and style (the default is plain). A spinner increments or decrements the font size, or you can enter the font size manually.

Figure 4.15. The Font tab of the Text properties box contains settings for fonts in forms and documents.


All properties boxes can be moved by clicking the title bar and dragging them to a new location. You can also collapse properties boxes to reduce the amount of screen space they occupy. You can do so by double-clicking the title bar or by clicking the Collapse/Expand button next to the question mark in the upper-right corner of the title bar. Double-clicking or clicking the Collapse/Expand button again restores the properties box to full size. The Expand/Collapse button changes appearance as you toggle between the full properties box and the collapsed properties box. Certain properties boxes display a tool palette when collapsed . This is the case with the Text properties box (see Figure 4.16).

Figure 4.16. When collapsed, the Text properties box displays a palette of commonly used items.


The collapsed properties box offers a toolbox, which is a combination of items from the Font and Alignment tabs, plus several other useful options such as buttons to bold, italicize, and underline text; activate and deactivate the Permanent Pen; create tables; attach files; and import objects. There are also buttons to indent text, outdent text, and add bullets and buttons . During form design, you will find this toolbox to be very useful.


Many of these options are available from the menu and the SmartIcons toolbar, and many have corresponding hotkeys, such as Ctrl+B to bold text. You can also launch the Text properties box to the Font tab by using the hotkey combination Ctrl+K, and you can open the Paragraph Alignment tab with Ctrl+J.


The Paragraph Alignment tab has settings for paragraph alignment, the first line, lists, and line spacing. Some of these will be useful for form design, and others are primarily useful when composing and editing pages and documents (see Figure 4.17).

Figure 4.17. The Paragraph Alignment tab enables you to set many list choices.


The following options are available:




Check mark


Alphabet (uppercase)

Alphabet (lowercase)

Roman (uppercase)

Roman (lowercase)

The Paragraph Margins tab, shown in Figure 4.18, has pagination settings that control margins for printing, tab stops, and page breaks. The settings on this tab are used more for text in documents than they are for design.

Figure 4.18. The Paragraph Margins tab has three sections: Margins, Tab Stops, and Pagination.



Although you can set tab stops in the properties box, it is much easier to use the ruler. You can open the ruler from the menu by choosing View, Ruler, or by pressing Ctrl+R. Tab stops can be set by clicking on the ruler.



Tab stops do not work on the WebHTML ignores tabs, and what appear as neatly formatted documents to a Notes client will wind up a horrible mess. You can use tables to control the placement of text and fields on forms, which works for both Web and Notes clients .


The Paragraph Borders tab, new to Notes and Domino 6, sets the border style, border effects, and border thickness . The settings function in much the same way as the border settings for a table. See Figure 4.19.

Figure 4.19. The Paragraph Borders tab is set to display a solid border with a drop shadow. You can see the results on the form in the background.


The border surrounds the entire paragraph. This has two immediate ramifications . First, the border extends to the margins of the page. Second, when you start a new paragraph, you get borders around each paragraph.

Using the Paragraph Hide When Tab

The Paragraph Hide When tab (see Figure 4.20) is often used in form design. This tab enables you to specify conditions under which to hide objects in a paragraph. You can choose from the available check boxes, you can use a formula, or you can choose a combination of check boxes and a formula. For example, you can use the Paragraph Hide When tab to hide the Action bar buttons based on the state of the document. It doesn't make much sense to display an Edit action button when the document is already in edit mode, nor does it make any sense to display a Save action button if the document is in read mode. You can use the check boxes to selectively hide such buttons on a form. You can also refine the Hide conditions by using a formula. The following lists each of the Hide conditions:

  • Hide Paragraph From

    Notes R4.6 or Later

    Web Browsers


  • Hide Paragraph When Document Is

    Previewed for Reading

    Previewed for Editing

    Opened for Reading

    Opened for Editing


    Copied to the Clipboard


  • Hide Paragraph If Formula Is True

Figure 4.20. The Paragraph Hide When tab is often used in Notes forms to hide objects.



Despite the fact that there is a Hide tab on the Field properties box and on the properties boxes for many other objects, hide-when attributes are applied to paragraphs, not to individual objects within a paragraph. For example, you cannot selectively hide objects within a line. If you want to selectively hide objects on the same line, create a table and place the objects in different cells in a table. The only exception to this is in a layout region. In a layout region, each object can have its own hide-when attributes.


When you write a Hide formula, you must use the Formula language. (The Formula language is discussed in Chapter 12, "Using the Formula Language," and Chapter 13, "Real-World Examples Using the Formula Language.") Because the formula must evaluate to True to hide the object, building the formulas can be a little tricky. It is important to remember that when the formula evaluates to True in the Formula language, the object is hidden. At first, this seems backward, and it can take some time to understand. Not to belabor this point, but you can hide an object at all times by including a 1 in the Formula window ( 1 is True in the Formula language) and checking the Hide Paragraph If Formula Is True check box.

When you write formulas for this event, it is not always necessary to use @If() . For example, to hide an action when a document is new, which you might do for a button used by approvers for a document used in workflow, you might use the following formula:

@If(@IsNewDoc; @True; @False)

However, you don't need to go to that much trouble; instead, you can use the following:


This formula returns True , or 1 , if the document has just been created, and it effectively hides the action button. To hide a button that might be used only when composing a new document, you can use a formula such as the following:


As you probably know, the exclamation point is a logical NOT , so this means "Hide this action button when the document is not new"that is, when someone has opened it for editing after it has been created and saved.

You might want to further restrict access to buttons through the use of roles, which is a typical method in many applications. Perhaps you want to make a button available only to application users whom you have designated as the application's manager (not to be confused with Manager access). Create a role, perhaps DBAdmin , and use the following hide formula:

!@Contains(@UserRoles; "DBAdmin")

This formula hides the button when the user does not have the DBAdmin role. You may have noticed that in the preceding formula, "DBAdmin" is not enclosed in brackets. As you may know, @UserRoles returns a list of roles including the square brackets. Because @Contains does not look for an exact match, the formula works. It will also work if you include the brackets in the substring argument of @Contains :

!@Contains(@UserRoles; "[DBAdmin]")

An earlier paragraph discussed using a combination of a Hide formula and check boxes. To do this, create a Hide formula and select the appropriate check boxes. Using the example of a Reviewer button, you might want it visible only during edit mode. Use a Hide formula such as the following, and click the Previewed for Reading and Opened for Reading check boxes:

!@Contains(@UserRoles; "[Reviewer]")

The same ideas can be applied to objects other than actions, such as text, graphics, and HTML code, just to name a few. You might want to hide HTML code from Notes users. To do so, highlight the paragraphs containing the HTML and click the Notes R4.6 or later check box. This allows the HTML to be presented to a Web browser but not to a Notes client.

As you can see, artful use of the Hide conditions for objects is of tremendous value to the applications developer.

Using the Style Tab

It is useful to create definitions for frequently used styles in form design. You can define styles for field labels and hidden text, for example. It is very convenient to highlight the text and select a style from the Style tab rather than having to separately apply each element of the style that you want to use. For example, you might want to include text that is hidden on the documents produced by a form. To create a style for hidden text, follow these steps:

  1. Format a text selection as Default Sans Serif, 8 points, and plain.
  2. Select a color other than black, such as cyan.
  3. Launch the Text properties box and click the Styles tab.
  4. Click the Create Style button.
  5. Enter the name of the style as Hidden and check Make Style Available for All Documents (see Figure 4.21).

    Figure 4.21. Creating a new style is very simple.


You can also assign the style to the Style Cycle key (F11). When you do this, pressing F11 cycles through stored styles.

Part I. Introduction to Release 6

Whats New in Release 6?

The Release 6 Object Store

The Integrated Development Environment

Part II. Foundations of Application Design

Forms Design

Advanced Form Design

Designing Views

Using Shared Resources in Domino Applications

Using the Page Designer

Creating Outlines

Adding Framesets to Domino Applications

Automating Your Application with Agents

Part III. Programming Domino Applications

Using the Formula Language

Real-World Examples Using the Formula Language

Writing LotusScript for Domino Applications

Real-World LotusScript Examples

Writing JavaScript for Domino Applications

Real-World JavaScript Examples

Writing Java for Domino Applications

Real-World Java Examples

Enhancing Domino Applications for the Web

Part IV. Advanced Design Topics

Accessing Data with XML

Accessing Data with DECS and DCRs

Security and Domino Applications

Creating Workflow Applications

Analyzing Domino Applications

Part V. Appendices

Appendix A. HTML Reference

Appendix B. Domino URL Reference

Lotus Notes and Domino 6 Development
Lotus Notes and Domino 6 Development (2nd Edition)
ISBN: 0672325020
EAN: 2147483647
Year: 2005
Pages: 288 © 2008-2020.
If you may any questions please contact us: