Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Maximum font size script

Avatar

Avatar
Level 1
radugbhr
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
radugbhr
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

0 solutions
View profile
radugbhr
Level 1

22-01-2015

Howdy all!  Have a tricky question. Using LiveCycle ES 8.2

Working on a form, I've got a pair of linked text fields (global data linked).

These text fields are static in size, but I need the values typed into them to shrink when it fills up the visible area of the text field.  I can't set the value font size to 0pt from the start.  It makes the initial font size too big for the value.  The font size needs to remain at 16 pt until the value fills up the field's visible area, then it needs to switch over to 0pt (hence triggering a full event).

I've tried using a full event with the following code;

  1. this.font.size = "0pt";

But it won't fire.  I wonder if there is a limitation to the what the full event can trigger.  I can use the change event or even the exit event if I have to.

I've also tried a calculate event with the following script:

  1. if (this.rawValue.length > 48) {
  2.      this.font.size = "0pt";
  3. }
  4. else {
  5.      this.font.size = "16pt";
  6. }

But this did not fire as well.  And yes, I have the scripting set to Javascript...not Formcalc.


Any suggestions?

View Entire Topic

Avatar

Avatar
Level 1
radugbhr
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
radugbhr
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

0 solutions
View profile
radugbhr
Level 1

09-02-2015

Still isn't opening up.  I am running Reader XI and Acrobat 9 Pro (9.4) on my system.  So I don't think either one should have any problems with compatibility.

So, in LiveCycle ES2, is there an option to change this reasonable maximum font size?  Like can it be customized to a field, the whole form, or is it coded globally for all XFA PDFs?