Applying a Color Scheme

 <  Day Day Up  >  

Applying a Color Scheme

InfoPath 2003 provides a Color Schemes task pane, shown in Figure 6.10. If you don't need to create form templates in particular corporate colors, the Color Schemes task pane can be useful.

Figure 6.10. The Color Schemes task pane.

graphics/06fig10.gif

To apply a color scheme to a view, click the desired color scheme from the choices offered in the Color Schemes task pane. In InfoPath 2003, the color scheme is applied only to the Table with Title layout table and to the Custom Table layout table. For all practical purposes, this means that if you want to be able to easily change the color scheme of a view, you must confine yourself to only those two types of layout table! The relatively easy-to-use functionality that lets you split and merge cells makes it pretty easy to create useful designs using only those two layout tables, but it is puzzling why the other layout tables are unaffected by color scheme selections.

CUSTOM STYLING OVERRIDES COLOR SCHEMES

Be careful if you experiment with using customized coloring of text or background ( shading in InfoPath jargon). Any changes you make to a selected piece of text or individual cell mean that you cannot then apply a color scheme to that text or table cell !


Clicking on a color scheme in the Color Schemes task pane has no effect on the background color, text color, or outline of other layout tables.

For simple color styling, the Color Schemes task pane is easy to use, but it lacks several facilities that I would have expected it to have.

Gaps in InfoPath Styling Capabilities

If you are using InfoPath form templates throughout an organization, you might expect that you could use the InfoPath user interface to create corporate-wide styling of form templates. Unfortunately, at least in its first version, InfoPath fails to provide support via its user interface for such corporate-wide styling.

No Support for External CSS

In InfoPath 2003, there is no way to create or modify an external CSS style sheet using the user interface. In fact, the presence of multiple style elements in the head of the HTML files produced by InfoPath's XSLT stylesheets means that any external CSS rules would be overridden by rules in the style elements.

In a corporate tool, it would have been very useful to include an easy way to specify an external CSS style sheet for a form template. This would allow corporate colors to be easily applied to a form template or set of form templates.

Equally, if a change of corporate styling is imposed, it would have been easy to change an external CSS style sheet. In InfoPath 2003, any change of styling in a set of InfoPath form templates would be a fairly major, tedious undertaking.

No Support for Custom Color Schemes

The Color Schemes task pane provides 17 color schemes, plus an option to specify no color scheme. A notable omission from the Color Schemes task pane is any way to create a custom color scheme in your corporate colors. In addition, there is no way to find out what colors are being applied from the InfoPath user interface.

You can hand edit XSLT and add a style element after the built-in style elements and use the CSS !important directive to add custom style information.

SHOP TALK
COLOR SCHEMES ARE A FRUSTRATING BUSINESS

I found trying to consistently apply color styling to InfoPath views a clumsy and frustrating experience. As I indicated elsewhere in this chapter, there is no facility to create a custom color scheme, which seems to me to be an extraordinary omission in a product that targets the corporate market. If a business has selected a corporate color scheme, surely it isn't too much to expect a corporate forms tool such as InfoPath 2003 to provide a way to easily apply that color scheme across all form templates.

The XSLT stylesheets that create InfoPath views include three separate style elements that would override any style rules in external style sheets; and, in addition, any custom color styling causes information to be added to individual elements in the HTML to be created by the XSLT stylesheet.

In principle, therefore, a designer would need to finalize a design, extract the form files from the form template, delete all style elements and attributes inside the XSLT stylesheet, and add a link to an external CSS style sheet. Although this might be possible in theory, I can't imagine too many designers wanting to muddle around inside the XSLT simply to apply corporate styling to a view. This is something that really ought to be possible in an enterprise forms product.


 <  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