4 Replies Latest reply on Apr 24, 2014 3:56 PM by MaxCO2012

    addField Properties - Is there a documented order to set them?

    MaxCO2012 Level 1

      Today I experienced something odd. Using the code below my text fields were all being added correctly and formatted "mostly" corrected except with respect to the textSize property. Using this code the textSize property will not set.

       

      var f = this.addField(nbBookmarks(i), "text", nbPageNum(i) - 1, nbCoords);

           f.multiline = true;

           f.borderStyle = border.s;

           f.strokeColor = color.black;

           f.fillColor = color.white;

           f.lineWidth = 1;

           f.style = style.cr;

           f.textSize = 9;

           f.display = display.visible;

       

      On a hunch, I moved the textSize property line to the top (as shown below) and the textSize property sets fine.

       

      var f = this.addField(nbBookmarks(i), "text", nbPageNum(i) - 1, nbCoords);

           f.textSize = 9;

           f.multiline = true;

           f.borderStyle = border.s;

           f.strokeColor = color.black;

           f.fillColor = color.white;

           f.lineWidth = 1;

           f.style = style.cr;

           f.display = display.visible;

       

      Is the "order" of setting the properties of a field documented somewhere? If so, can you please direct me to that place? And if this is right in front of me somewhere and I just can't see it, I apologize.

       

      Thank you.