The Rich Text Box Control

 <  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.

graphics/04fig07.gif

Constraining User Changes

If 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.

graphics/04fig08.gif

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 Options

In 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.

graphics/04fig09.gif

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 .


NO PASSWORD CONTROL IN INFOPATH 2003

Developers of InfoPath 2003 form templates are sometimes surprised to learn that InfoPath has no password form control. It seems likely that the designers of InfoPath, as part of InfoPath's departure from normal HTML forms in a direction specifically targeting enterprise forms, assumed that it was unlikely that users of InfoPath would be in a situation where an InfoPath form was used to log in. In an enterprise situation, a user might be expected to have logged in using Windows authentication, for example.

If you want to use a login to control access across the Web to an InfoPath form, you need to use a login page in Internet Explorer.


 <  Day Day Up  >  


Microsoft Office InfoPath 2003 Kick Start
Microsoft Office InfoPath 2003 Kick Start
ISBN: 067232623X
EAN: 2147483647
Year: 2004
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net