<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Field Background Color Fill</title>
	<atom:link href="http://forms.stefcameron.com/2008/03/14/field-background-color-fill/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Thu, 19 Jan 2012 16:32:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4425</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Thu, 17 Jun 2010 01:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4425</guid>
		<description>@Neha,

Yes, you have to do it field-by-field, recursively into all containers. My &lt;a href=&quot;http://forms.stefcameron.com/2006/06/26/process-all-fields/&quot; rel=&quot;nofollow&quot;&gt;Process All Fields&lt;/a&gt; script can help you with that.</description>
		<content:encoded><![CDATA[<p>@Neha,</p>
<p>Yes, you have to do it field-by-field, recursively into all containers. My <a href="http://forms.stefcameron.com/2006/06/26/process-all-fields/" rel="nofollow">Process All Fields</a> script can help you with that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neha</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4424</link>
		<dc:creator>Neha</dc:creator>
		<pubDate>Tue, 08 Jun 2010 10:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4424</guid>
		<description>Hi Stefan,

How can we set the background color of all the fields in a particular subform based on a dropdown value.
Do we need to go field by field or do we have a script to access all fields in a subform with nested subforms.


Thanks
Neha</description>
		<content:encoded><![CDATA[<p>Hi Stefan,</p>
<p>How can we set the background color of all the fields in a particular subform based on a dropdown value.<br />
Do we need to go field by field or do we have a script to access all fields in a subform with nested subforms.</p>
<p>Thanks<br />
Neha</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4423</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Mon, 14 Sep 2009 00:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4423</guid>
		<description>Abu Saleh,

Setting a fill on a circle or rectangle is a little tricky. In this case, the XFA object will look like this (for a circle or rectangle):

&lt;pre&gt;&lt;code&gt;&lt;draw&gt;
    ...
    &lt;value&gt;
        &lt;arc&#124;rectangle&gt;
            ...
        &lt;/arc&#124;rectangle&gt;
    &lt;/value&gt;
&lt;/draw&gt;&lt;/code&gt;&lt;/pre&gt;

When setting a solid fill, you need to set the following XFA structure &lt;em&gt;inside&lt;/em&gt; the &lt;arc&gt; or &lt;rectangle&gt; value type node:

&lt;pre&gt;&lt;code&gt;&lt;fill presence=&quot;visible*&quot;&gt;
    &lt;color&gt;R,G,B&lt;/color&gt;&lt;-- start --&gt;
    &lt;linear type=&quot;toRight*&#124;toLeft&#124;toTop&#124;toBottom&quot;&gt;
        &lt;color&gt;R,G,B&lt;/color&gt;&lt;-- end --&gt;
    &lt;/linear&gt;
&lt;/fill&gt;&lt;/code&gt;&lt;/pre&gt;
(* = default)

The problem is that, initially, none of those nodes exist so you need to create them.

Here&#039;s a sample script that sets a linear to-right fill on a circle object:

&lt;pre&gt;&lt;code&gt;// JavaScript:

// create start color
var startColorNode = xfa.form.model.createNode(&quot;color&quot;);
startColorNode.value = &quot;255,0,0&quot;; // red

// create end color
var endColorNode = xfa.form.model.createNode(&quot;color&quot;);
endColorNode.value = &quot;255,255,0&quot;; // yellow

// create linear node for fill type
var linearNode = xfa.form.model.createNode(&quot;linear&quot;);
linearNode.type = &quot;toRight&quot;; // start on left, end on right
linearNode.nodes.append(endColorNode); // add end color

// create fill node for arc (circle)
var fillNode = xfa.form.model.createNode(&quot;fill&quot;);
fillNode.nodes.append(startColorNode); // add start color
fillNode.oneOfChild = linearNode; // add fill type

// remove old arc fill (if any) and set new one
if (Circle1.value.arc.resolveNode(&quot;#fill&quot;))
{
    Circle1.value.arc.nodes.remove
    (
        Circle1.value.arc.resolveNode(&quot;#fill&quot;)
    );
}
Circle1.value.arc.nodes.append(fillNode);&lt;/code&gt;&lt;/pre&gt;

For a radial fill, you need to set the following XFA structure &lt;em&gt;inside&lt;/em&gt; the &lt;arc&gt; or &lt;rectangle&gt; value type node:

&lt;pre&gt;&lt;code&gt;&lt;fill presence=&quot;visible*&quot;&gt;
    &lt;color&gt;R,G,B&lt;/color&gt;&lt;-- start --&gt;
    &lt;radial type=&quot;toEdge*&#124;toCenter&quot;&gt;
        &lt;color&gt;R,G,B&lt;/color&gt;&lt;-- end --&gt;
    &lt;/linear&gt;
&lt;/fill&gt;&lt;/code&gt;&lt;/pre&gt;
(* = default)

The code would therefore be very similar to the example above, creating a new radial node rather than a linear node.

For the solid fill case, the XFA structure is much simpler:

&lt;pre&gt;&lt;code&gt;&lt;fill presence=&quot;visible*&quot;&gt;
    &lt;color&gt;R,G,B&lt;/color&gt;&lt;-- start --&gt;
&lt;/fill&gt;&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Abu Saleh,</p>
<p>Setting a fill on a circle or rectangle is a little tricky. In this case, the XFA object will look like this (for a circle or rectangle):</p>
<pre><code>&lt;draw>
    ...
    &lt;value>
        &lt;arc|rectangle>
            ...
        &lt;/arc|rectangle>
    &lt;/value>
&lt;/draw></code></pre>
<p>When setting a solid fill, you need to set the following XFA structure <em>inside</em> the &lt;arc> or &lt;rectangle> value type node:</p>
<pre><code>&lt;fill presence="visible*">
    &lt;color>R,G,B&lt;/color>&lt;-- start -->
    &lt;linear type="toRight*|toLeft|toTop|toBottom">
        &lt;color>R,G,B&lt;/color>&lt;-- end -->
    &lt;/linear>
&lt;/fill></code></pre>
<p>(* = default)</p>
<p>The problem is that, initially, none of those nodes exist so you need to create them.</p>
<p>Here&#8217;s a sample script that sets a linear to-right fill on a circle object:</p>
<pre><code>// JavaScript:

// create start color
var startColorNode = xfa.form.model.createNode("color");
startColorNode.value = "255,0,0"; // red

// create end color
var endColorNode = xfa.form.model.createNode("color");
endColorNode.value = "255,255,0"; // yellow

// create linear node for fill type
var linearNode = xfa.form.model.createNode("linear");
linearNode.type = "toRight"; // start on left, end on right
linearNode.nodes.append(endColorNode); // add end color

// create fill node for arc (circle)
var fillNode = xfa.form.model.createNode("fill");
fillNode.nodes.append(startColorNode); // add start color
fillNode.oneOfChild = linearNode; // add fill type

// remove old arc fill (if any) and set new one
if (Circle1.value.arc.resolveNode("#fill"))
{
    Circle1.value.arc.nodes.remove
    (
        Circle1.value.arc.resolveNode("#fill")
    );
}
Circle1.value.arc.nodes.append(fillNode);</code></pre>
<p>For a radial fill, you need to set the following XFA structure <em>inside</em> the &lt;arc> or &lt;rectangle> value type node:</p>
<pre><code>&lt;fill presence="visible*">
    &lt;color>R,G,B&lt;/color>&lt;-- start -->
    &lt;radial type="toEdge*|toCenter">
        &lt;color>R,G,B&lt;/color>&lt;-- end -->
    &lt;/linear>
&lt;/fill></code></pre>
<p>(* = default)</p>
<p>The code would therefore be very similar to the example above, creating a new radial node rather than a linear node.</p>
<p>For the solid fill case, the XFA structure is much simpler:</p>
<pre><code>&lt;fill presence="visible*">
    &lt;color>R,G,B&lt;/color>&lt;-- start -->
&lt;/fill></code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abu Saleh</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4422</link>
		<dc:creator>Abu Saleh</dc:creator>
		<pubDate>Thu, 03 Sep 2009 06:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4422</guid>
		<description>Hi Stefan,

How do you reference the visual properties of non-interactive objects in Adobe LC Designer?

I need, for example, to fill a circle (or rectangle) in solid, linear, or radial format (with start and end colors).

BR,

Yasser</description>
		<content:encoded><![CDATA[<p>Hi Stefan,</p>
<p>How do you reference the visual properties of non-interactive objects in Adobe LC Designer?</p>
<p>I need, for example, to fill a circle (or rectangle) in solid, linear, or radial format (with start and end colors).</p>
<p>BR,</p>
<p>Yasser</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: E. Loralon</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4421</link>
		<dc:creator>E. Loralon</dc:creator>
		<pubDate>Fri, 20 Feb 2009 19:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4421</guid>
		<description>Thank you Stefan.

Actually, I had the show/hide solution working and thought there might be a more elegant solution to accomplish the same thing.</description>
		<content:encoded><![CDATA[<p>Thank you Stefan.</p>
<p>Actually, I had the show/hide solution working and thought there might be a more elegant solution to accomplish the same thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4420</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Fri, 20 Feb 2009 16:29:24 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4420</guid>
		<description>E. Loralon,

Unfortunately, you can&#039;t change the object at runtime. The best you can do is show/hide the appropriate object or use the &lt;a href=&quot;http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/&quot; rel=&quot;nofollow&quot;&gt;instance manager&lt;/a&gt; to add/remove the appropriate subform that contains the object you want to use (better for data binding).</description>
		<content:encoded><![CDATA[<p>E. Loralon,</p>
<p>Unfortunately, you can&#8217;t change the object at runtime. The best you can do is show/hide the appropriate object or use the <a href="http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/" rel="nofollow">instance manager</a> to add/remove the appropriate subform that contains the object you want to use (better for data binding).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: E. Loralon</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4419</link>
		<dc:creator>E. Loralon</dc:creator>
		<pubDate>Fri, 20 Feb 2009 14:59:26 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4419</guid>
		<description>Hi Stefan,

Is it possible to change object type for instance textfield to drop-down list at runtime?

Thank you for your help.</description>
		<content:encoded><![CDATA[<p>Hi Stefan,</p>
<p>Is it possible to change object type for instance textfield to drop-down list at runtime?</p>
<p>Thank you for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Nesbitt</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4418</link>
		<dc:creator>John Nesbitt</dc:creator>
		<pubDate>Fri, 04 Apr 2008 01:57:41 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4418</guid>
		<description>Reversing the script in the prePrint event will definitely work - give that a go if you still want to remove the colour.</description>
		<content:encoded><![CDATA[<p>Reversing the script in the prePrint event will definitely work &#8211; give that a go if you still want to remove the colour.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark J</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4417</link>
		<dc:creator>Mark J</dc:creator>
		<pubDate>Thu, 03 Apr 2008 21:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4417</guid>
		<description>Thanks John,

I appreciate your efforts and time with trying to help me solve this. We will have to just live with the colors being printed until i can come up with something else but if you think of anything else i would appreciate more input. thanks again.

MJ</description>
		<content:encoded><![CDATA[<p>Thanks John,</p>
<p>I appreciate your efforts and time with trying to help me solve this. We will have to just live with the colors being printed until i can come up with something else but if you think of anything else i would appreciate more input. thanks again.</p>
<p>MJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Nesbitt</title>
		<link>http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4416</link>
		<dc:creator>John Nesbitt</dc:creator>
		<pubDate>Sun, 30 Mar 2008 22:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2008/03/14/field-background-color-fill/#comment-4416</guid>
		<description>Mark,

Sorry, I just tried out that script and also referenced the LC Designer Reference document and it looks like a fill can&#039;t be given a relevant property - sorry!

The script I gave earlier only removed the border&#039;s edge (I assumed it applied to all of the border&#039;s child objects and therefore the edge and the fill would not be printed).

John.</description>
		<content:encoded><![CDATA[<p>Mark,</p>
<p>Sorry, I just tried out that script and also referenced the LC Designer Reference document and it looks like a fill can&#8217;t be given a relevant property &#8211; sorry!</p>
<p>The script I gave earlier only removed the border&#8217;s edge (I assumed it applied to all of the border&#8217;s child objects and therefore the edge and the fill would not be printed).</p>
<p>John.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

