Adobe COLDFUSION 9 Manual page 784

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Styles can be inheritable or noninheritable. If a style is noninheritable, it only affects the tag, and does not affect any of
its children. For example, to maintain a consistent background color in an
specify the color in all tags. If a style is inheritable, it applies to the tag and its children.
Example: applying styles to a Flash form
The following code creates a Flash form that uses a skin and styles to control its appearance.
The code for the form is as follows. Comments in the code explain how formatting controls and styles determine the
appearance.
<!--- Specify the form height and width, use the HaloBlue skin.
Note: Flash ignores a backgroundColor style set in cfform. --->
<cfform name="myform" height="390" width="440" format="Flash" skin="HaloBlue">
<!--- The input area is a panel. Styles to specify panel characteristics.
Child controls inherit the background color and font settings. --->
<cfformgroup type="Panel" label="Contact Information"
style="marginTop:20; marginBottom:20; fontSize:14; fontStyle:italic;
headerColors:##FFFF00, ##999900; backgroundColor:##FFFFEE;
headerHeight:35; cornerRadius:12">
<!--- This vbox sets the font size and style, and spacing between and
around its child controls. --->
<cfformgroup type="vbox" style="fontSize:12; fontStyle:normal;
verticalGap:18; marginLeft:10; marginRight:10">
<!--- Use a horizontal group to align the first and last name fields
and set a common label. --->
<cfformgroup type="horizontal" label="Name" >
<!--- Use text styles to highlight the entered names. --->
<cfinput type="text" required="Yes" name="firstName" label="First"
value="" width="120" style="color:##006090; fontSize:12;
fontWeight:bold" />
<cfinput type="text" required="Yes" name="lastName" label="Last"
value="" width="120" style="color:##006090; fontSize:12;
fontWeight:bold"/>
</cfformgroup>
<!--- Horizontal rules surround the e-mail address.
Styles specify the rule characteristics. --->
<cfformitem type="hrule" style="color:##999900; shadowColor:##DDDD66;
strokeWidth:4"/>
<cfformitem type="HTML" Style="marginTop:0; marginBottom:0">
<textformat indent="57"> <font size="-1">Flash fills this field in
Last updated 8/5/2010
form group and its children tags,
hbox
779

Advertisement

Table of Contents
loading

Table of Contents