< Day Day Up > |
The rich text box control provides properties not found in conventional HTML forms. A rich text box control is possible only when the control corresponds to an xsd:any element in the W3C XML Schema document for the data source. The role of W3C XML Schema is discussed in detail in Chapter 10, "Validating Form Data." This association of a rich text box with xsd:any means that a rich text box cannot be used with a relational database such as Microsoft Access or SQL Server 2000, because database columns don't allow arbitrarily structured content, which is what the xsd:any element signifies. To learn more about W3C XML Schema and validation, see "Using W3C XML Schema," p. 183 . Because a rich text box can contain any arbitrary structure, its size increases automatically to accommodate text or images that you add to it. A rich text box opens up new possibilities for highlighting parts of, say, comments that summarize a site visit to a customer site. You can style text in bold, underlining, or italics to emphasize important text. You can structure content using, for example, bulleted lists inside the rich text box. You can insert hyperlinks or images using the menu choices (on the Insert menu) or using the buttons in the Standard toolbar. Figure 4.7 shows how a comments section can be brought to life by changing the font color (the bold text is also red) and adding underlining and a bulleted list. Figure 4.7. Using a rich text box to structure and highlight comments on a site visit.
Constraining User ChangesIf you prefer users to be constrained in what they can add to a rich text box control, you can adjust settings on the Display tab of the Rich Text Box Properties window (see Figure 4.8). Figure 4.8. The Rich Text Box Properties window.
You have three check box options in the Available Formatting section of the Rich Text Box Properties window. All three are checked by default. If only the Paragraph Breaks check box is checked, you can create paragraphs of text in the rich text box, but you can't format text. Formatting text is enabled by checking the Character Formatting check box. If you want to allow users to insert lists, tables, and images, check Full Rich Text. Display OptionsIn the Options section of the Display tab, you can specify whether the rich text box is read-only. You can also specify whether the InfoPath spell checker should check spelling inside a rich text box control. By default, spell checking is enabled. The Enable Spelling Checker check box specifies whether spell checking is enabled. Given that a rich text box can contain an arbitrary amount of text, it makes sense to leave the Wrap Text check box checked. The Scrolling drop-down menu is used to specify how you want the rich text box control to handle large amounts of text. There are four options (see Figure 4.9). The default is that the size of the rich text box expands to accommodate the content that is added to it. Figure 4.9. The scrolling options for a rich text box.
The final option on the Display tab controls conditional formatting, which is discussed in Chapter 6. To learn more about conditional formatting, see "Conditional Formatting," p. 117 .
|
< Day Day Up > |