Question
How to change button caption color in pdf by javascript
Hi There,
I want to toggle the button color of a pdf form along the with the caption/label color of each button. For this, I have written this code:
for(i=1;i<bn+1;i++){
var b = "btn"+i;
var f = this.getField(b);
if (color.equal(f.fillColor, color.white)){
f.textColor = color.white;
f.fillColor = color.red;
}else{
if(bn==1){
f.fillColor = color.white;
f.textColor = color.black;
}else{
f.textColor = color.black;
}
}
Everything is working well except for the color of the Caption/Label. It is black in default and remains black even the fill color is changing. How to change the Caption/Label color to white too?
