Expand my Community achievements bar.

SOLVED

Gray Italic Help Text Problem

Avatar

Level 9

I am trying to confirm that the script below is correct. It is used to create gray italic help text in a field that is null. At times, the caption font changes to italics instead of remaining "normal". Is the line of script in red below correct or should it be: this.caption.font.posture = "normal"; (without the .value)?

Form1.Subform1.ReviewDate::initialize - (JavaScript, client)
this.execEvent("exit");
this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";

Form1.Subform1.ReviewDate::enter - (JavaScript, client)
this.fontColor = "0,0,0";
this.font.posture = "normal";

Form1.Subform1.ReviewDate::exit - (JavaScript, client)
if (this.isNull)
{
this.fontColor = "153,153,153";
this.caption.font.fill.color.value = "0,0,0";
this.caption.font.posture.value = "normal"
this.font.posture = "italic";
}

Form1.Subform1.ReviewDate::prePrint - (JavaScript, client)
this.format.picture.value = "";

Form1.Subform1.ReviewDate::postPrint - (JavaScript, client)
this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";

Thanks for any help you can offer.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

You don't need the ".value" here, in the XML Source view your field caption will look something like;

            <caption reserve="25mm">

               <para vAlign="middle"/>

               <value>

                  <text>Text Field</text>

               </value>

               <font typeface="Myriad Pro" posture="italic">

                  <fill>

                     <color value="255,0,0"/>

                  </fill>

               </font>

            </caption>

You can see that color is an element with a value attribute and posture is just an attribute (so does not need a value property)

Regards

Bruce

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

You don't need the ".value" here, in the XML Source view your field caption will look something like;

            <caption reserve="25mm">

               <para vAlign="middle"/>

               <value>

                  <text>Text Field</text>

               </value>

               <font typeface="Myriad Pro" posture="italic">

                  <fill>

                     <color value="255,0,0"/>

                  </fill>

               </font>

            </caption>

You can see that color is an element with a value attribute and posture is just an attribute (so does not need a value property)

Regards

Bruce

Avatar

Level 9

That makes sense. Thanks for researching this for me! I appreciate your help.

-Don