Flash Form Theme Color Gotcha
Posted By : todd sharp Posted At : September 28, 2006 2:40 PM Posted In: Flash Forms, ColdFusion
1
Scott Stroz posted a few days ago about a cool way to customize the 'skin' color of a flash form. I mentioned in the comments that I had experienced some weirdness with datagrids not obeying the themeColor. Scott mentioned that his datagrids did obey the new themeColor, so I did a quick experiment. I found out that by setting the themeColor as an inline style using Scott's method will properly style the grid, but using formatting the way that I was using setStyle in Actionscript is what caused the grid weirdness.
<cfform format="flash" style="themeColor:##FF6666;">
<cfinput type="text" name="foo" label="foo">
<cfgrid name="fooGrid">
<cfgridcolumn name="fooCol"/>
<cfgridrow data="fooData"/>
</cfgrid>
</cfform>
<cfinput type="text" name="foo" label="foo">
<cfgrid name="fooGrid">
<cfgridcolumn name="fooCol"/>
<cfgridrow data="fooData"/>
</cfgrid>
</cfform>
<cfform format="flash" onload="a();">
<cfformitem type="script">
function a(){
_global.styles.Form.setStyle("themeColor", 0xFF6666);
}
</cfformitem>
<cfinput type="text" name="foo" label="foo">
<cfgrid name="fooGrid">
<cfgridcolumn name="fooCol"/>
<cfgridrow data="fooData"/>
</cfgrid>
</cfform>
<cfformitem type="script">
function a(){
_global.styles.Form.setStyle("themeColor", 0xFF6666);
}
</cfformitem>
<cfinput type="text" name="foo" label="foo">
<cfgrid name="fooGrid">
<cfgridcolumn name="fooCol"/>
<cfgridrow data="fooData"/>
</cfgrid>
</cfform>
