The default color for a selected radio button is black. I want to change it to red or some other color?
How can i change it?
Is there any code snippet for XFA?
thanks
Faraz
Solved! Go to Solution.
Views
Replies
Total Likes
You have to edit the xml. Once you've got it made you can save it as a library object.
You need to add a <fill><color value/></fill> section inside the <font></font> tag. If there is nothing else there the font tag may just look like <font typeface="Myriad Pro"/> you'll need to split the "/" out into its own closing tag <font typeface="Myriad Pro"></font>:
<field name="BlueCheckmark" w="4.319mm" h="4.278mm">
<ui>
<checkButton size="4.2333mm" mark="check">
<border hand="right" presence="hidden">
<?templateDesigner StyleID apcb0?></border>
</checkButton>
</ui>
<font size="0pt" typeface="Adobe Pi Std">
<fill>
<color value="0,0,255"/>
</fill>
</font>
<para vAlign="middle"/>
<value>
<integer>0</integer>
</value>
<items>
<integer>1</integer>
<integer>0</integer>
<integer>2</integer>
</items>
</field>
Views
Replies
Total Likes
See that attached sample.
-Nith
Views
Replies
Total Likes
This is unprotected copy.
Nith
Views
Replies
Total Likes
Thanks for the help.
Still in the attached document the selected color is black. How can i change that color?
Views
Replies
Total Likes
im curious how you did this, i don't see the code anywhere, is it in the settings?
Views
Replies
Total Likes
You have to edit the xml. Once you've got it made you can save it as a library object.
You need to add a <fill><color value/></fill> section inside the <font></font> tag. If there is nothing else there the font tag may just look like <font typeface="Myriad Pro"/> you'll need to split the "/" out into its own closing tag <font typeface="Myriad Pro"></font>:
<field name="BlueCheckmark" w="4.319mm" h="4.278mm">
<ui>
<checkButton size="4.2333mm" mark="check">
<border hand="right" presence="hidden">
<?templateDesigner StyleID apcb0?></border>
</checkButton>
</ui>
<font size="0pt" typeface="Adobe Pi Std">
<fill>
<color value="0,0,255"/>
</fill>
</font>
<para vAlign="middle"/>
<value>
<integer>0</integer>
</value>
<items>
<integer>1</integer>
<integer>0</integer>
<integer>2</integer>
</items>
</field>
Views
Replies
Total Likes
To "Jono Moore"
Yes thats exactly what i was looking for. I want to learn this xml of adobe forms. How and from where i can learn this? Any book/document?
thanks
Faraz
Views
Replies
Total Likes
There's lots of info available here: http://www.adobe.com/devnet/livecycle/designing_forms.html
I don't think you generally want to do much editing in the XML source, better to use the tools in LiveCycle.
Views
Replies
Total Likes
Editing the XML worked great for me too. It was the only way I was able to change the colour of the actual 'filled in button' part of the radio button. Thanks so much for this!
Views
Replies
Total Likes
Great stuff, I had no idea this could be done. I have one question: I have three radio buttons where "High" turns red when selected, "Medium" turns yellow, and "Low" turns green. In the screenshot below you can see there's a white box around each radio button that stays white. I don't mind if the the radio button itself is white/black, but I would like to have square area around each button to match the color of the entire button label. Can this be done via XML like the examples above? Thanks for any help.
The buttons are scripted like this:
// High button
if (this.rawValue == "1")
{
this.fillColor = "204,0,0"; //red fill
this.caption.font.fill.color.value = "255,255,255"; //white font
Medium.fillColor = "255,255,255"; // Medium button white fill
Low.fillColor = "255,255,255"; // Low button white fill
Low.border.edge.color.value = "255,255,255"; // Low button white border (removes black border)
Low.caption.font.fill.color.value = "0,0,0"; // Low button black font
}
// Medium button
if (this.rawValue == "2")
{
this.fillColor = "240,240,0"; // yellow fill
High.fillColor = "255,255,255"; // High button white fill
High.caption.font.fill.color.value = "0,0,0"; // High button black font
Low.caption.font.fill.color.value = "0,0,0"; // Low button black font
Low.fillColor = "255,255,255"; // Low button whilte fill
Low.border.edge.color.value = "255,255,255"; // white border (removes black border)
}
// Low button
if (this.rawValue == "3")
{
this.fillColor = "0,160,0"; // green fill
this.caption.font.fill.color.value = "255,255,255"; // white font
High.fillColor = "255,255,255"; // High button white fill
High.caption.font.fill.color.value = "0,0,0"; // High button black font
Medium.fillColor = "255,255,255"; // Medium button white fill
Medium.caption.font.fill.color.value = "0,0,0"; // Medium button black font
}
Views
Replies
Total Likes
Never mind -- I discovered that the white box frame disappears as soon as focus is moved to another object on the page. So just the inside of the button stays white (with the black center).
Views
Replies
Total Likes