Quantcast
Channel: Adobe Community : Popular Discussions - Adobe FrameMaker
Viewing all articles
Browse latest Browse all 23442

Changing the color of an object

$
0
0

I have tried very unsuccessfully to change the color of an object:

My simplest approach has been:

 

//  The current color of a pgf format is Black and I want to change it to Royal Blue

 

var myobject =  MyDoc.GetNamedObject(Constants.FO_PgfFmt,"Heading-3")

myobject.Color.Name = "Royal Blue";

alert(myobject.Color.Name)  // the colour is still Black

 

I have also tried:

 

var mycolorprops = myobject.Color.GetProps()

var i  = GetPropIndex(myobject.Color,Constant.Name)

mycolorprops[i].propVal.ival =  Constants.FV_COLOR_ROYALBLUE        

                                     or

mycolorprops[i].propVal.sval =  "Royal Blue"

 

If I can solve for Color then I will be able to work with all other commands that involve Properties.


Viewing all articles
Browse latest Browse all 23442

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>