Maximum font size script

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;
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:
if (this.rawValue.length > 48) {
     this.font.size = "0pt";
else {
     this.font.size = "16pt";
But this did not fire as well.  And yes, I have the scripting set to Javascript...not Formcalc.
Any suggestions?

Hi,
Using ES3 and just a 0 font initially (with all scripting removed) I get the following, for a short name;
Which seems about the right.
And for a long name
My version of your form is here https://sites.google.com/site/livecycledesignercookbooks/home/bizcard_form.1.pdf?attredire cts=0&d=1
There have been some changes since ES8, including a default font size added to the form properties, but not sure that is a factor as the largest font used in this sample is still smaller than the default.
Is this what you are seeing?
Bruce

Similar Messages

  • Maximum font size for auto-sized form text

    You need to let the user select a maximum font size for automatically sized text. If most of your fields are set at 10pt type, but you have one field for which you want the text to resize automatically, it looks stupid if that cell contains a small amount of text that’s set at 16pt or whatever. If you could set the maximum font size to 10pt for that field, then the text would be consistent with the text in the other fields unless there is so much text that it needs to scale down.

    Can anyone please advise?
    Cheers

  • Set maximum font size

    Is there a way that I can set the maximum font size?  I want to limit the size of all fonts.

    I found tinkertool, which did exactly what I wanted.  I love it.
    http://www.bresink.com/osx/0TinkerTool/download.php5

  • Maximum font size in a finder window

    Hello,
    I'm trying to increase the font size in ONE finder window, so that my wife with decreased mobility can read the text on a TV screen.
    In view options, the maximum is 16 pt. Is there any way to increase this? I do not want to increase the size in other windows.

    AFAICT, no. You could try lowering the display's resolution and see if that'll help. Alternatively, turn zoom on in Universal Access prefPane, zoom, and see if that works.

  • Calculating maximum font size

    Okay, I have a JTextField with wrap on. It's setEditable(false). The string in it is going to be changing constantly and the field has a fixed size. I'm trying to come up with a method that will determine the maximum sized font that will be able to fit in the TextField without requiring a ScrollPane.
    I'm not quite sure where to start on this one. I'm sure I can come up with a calculation involving font point size and FontMetrics.stringWidth() but I can't figure it out. Any ideas would be helpful.

    hi
    * Computes a correct font size to use for the text of this component.
    private void computeFontSize()
        int height = getSize().height;
        int width  = getSize().width;
        if (current_font != null) //this will be the font the component is currently showing
                // need to create a brand new Font everytime to see if the
                // stringWidth fits into our current width.
                // We can check height by pixels, but sadly need to create a new font
                // for checking the width.
                Font tempFont = new Font(current_font.getName(), current_font.getStyle(), height);
                FontMetrics fm = getFontMetrics(tempFont);
                if (fm != null)
         int textWidth  = fm.stringWidth(getText());
                         if (textWidth > getSize().width)
                                // Text doesn't fit horizontally; scale it down a bit.
                                // (stop div by zero errors)
                                if (textWidth < 1)     
                                         textWidth = 1;
                                int newFontHeight = (height * width) / textWidth;
                                if (newFontHeight != current_font.getSize())
                                      current_font = new Font(current_font.getName(), current_font.getStyle(), newFontHeight);
                         else if (tempFont.getSize() != current_font.getSize())
                               current_font = tempFont;
               tempFont = null;
               fm = null;
    }this code was taken from a homegrown label component that scales its own font based on its size.
    There is enough here for you to work out what you need.
    If it meets your needs, don't be shy with the dukes
    nes

  • Maximum font size?

    I am unable to get text larger than fontSize=127 with Flex.
    This limitation doesn't exist in Flash, what am I missing with
    Flex? This is a pretty huge problem for what I was doing.
    The whole text/font system seems to be lacking. Many font
    families don't seem to render with flex and default to one of the
    serif/san-serif fonts. Several fonts suffer from clipping at the
    end when fontStyle=italic. Neither the case in Flash.
    Thanks

    Hi,
    Did any of you two got a confirmation that this is a
    limitation in Flex?
    I seem to be having the same problem, and since our interface
    design requires a font size of 152 pixels, this looks like a
    serious problem for us.
    Regards,
    Arjan

  • Auto text font size

    Is there a way to set a text box so it keeps all the letters within the box at the maximum font size?
    for example:
    set a box 4x1 inch
    type a 4 letter name and from the start of the first letter to the end of the last letter be 4 inches
    then type an 8 letter name and from the start of the first letter to the end of the last letter be 4 inches again.
    My Dymo label maker software can do this. surely illustrator can too!
    if not, is there any scripts / alternatives?
    Thanks!!

    Jamie,
    Sorry, now I believe I understand.
    Unless you actually need a box, you may create the text as noermal live Type, then in the Transform palette set the desired W (width) value and Ctrl/Cmd+Enter to keep proportions.
    If you need a box, you may:
    1) Create the Type normally;
    2) In the Appearance palette flyout click Add New Fill/Stroke, depending on which kind of box you want;
    3) Drag the new Fill and/or Stroke down beneath the Characters in the main Appearance palette window and set the desired Color(s) and possible Stroke Weight;
    4) Effect>Convert to Shape and tick Rectangle, then set the Relative>Extra Weight/Height as desired (maybe 0), depending on how much you want it larger than the Bounding Box (you may set a positive value for Weight and 0 for Height);
    5) In the Transform palette set the desired W (width) value and Ctrl/Cmd+Enter to keep proportions.

  • Max font size on 'auto' size

    I've multiple lined text fields in the pdf document. I want the input to be resized if it exceeds (selected auto font size in properties) but I also want the first font size to be '10 pt'.
    When I select auto, it chooses the maximum font size to fit in the box, I want the upper limit to be fixed at 10 and it gets smaller if text exceeds the box size.
    How can I do that ?
    Acrobat Professional XI

    For multiline text fields, it seems the initial size is 12 when the font size is set to Auto. You don't have control over this, unfortunately.

  • How to change font size, maximum column size in the result screen ?

    hi All
    That's great when using SQL Dev.
    But I also have a trouble that how to change font size, maximum column size in the result screen ?
    My users think that font in result screen is shown very small, and whenever the data in each colum is long then it's not shown full data in column, they must double click for extend the size. Have the option to default the max size for showing full data in each column ? I try but still not to do that .
    Appreciate for anyone to help us.
    Thanks all.
    Sigmasvn

    You can't change the font for the results screen yet, however you will be able to select an auto-fit option for selected columns, so if some columns have slitghtly wider text you'll be able to set the column widths to handle these wider columns.
    Also, there s the option of switching the layout of a record in the grid.
    Sue

  • Change font size in sap script

    hallow
    i wont to change the font size in sap script to larger fonts how i do that?
    regards

    Hi,
    Try the following:
    Go to Tcode SE71.
    Provide the script name & Selct the 'Character Format" Radipobutton from the Subobject tab.
    Now go for Change.
    There is a Font Button on the rght hand side. select it & here you have Size field. Provide the size of font you want to change.
    Same thing you can do for Paragraph format.
    Reward points for helpful answers.
    Ashvender

  • Font Size in Script

    Hi All,
    I want to change the font size in script. ( for eg :when i change the size
    to 8 or 10 it accepts but if i give 9 it does not. it gives the message "not SAP font
    size".) wat do i do to get the required size. pls reply.
    thanks.
    kavitha

    Hi Kavitha,
    Use the transaction SE73 and  goto system fonts and create your font size.
    Hope this helps you.
    Thanks
    Phani

  • How to change the font size in sap scripts?

    hi friends,
        i had a query regarding to SAPSCRIPT.
      how to change the font size of a text in sap script form in which it should change it  dynamically.
    is it possible to change the font size dynamically in scripts.
    one more query regarding to this only.
    i need to get the hard copy of a script .
    what is the transaction code to get the hard copy?

    Hi venkata,
    You can specify the font size either in the Character format or pharagraph format.
    You better decide it according to your requirement.  If you want to apply the same font size for the entire form create the Paragraph format and give the paragraph format in the default paragraph format.
    If you want to apply that to limited text, then create character format.
    The process of creating it is just after going inside paragraph format click EDIT-> Create Element and give the font size.
    This applies for character format also.
    Reward points if useful.
    Thanks,
    karthik

  • SAP Script Box Width Vs Font Size

    Hi All,
    I have a SAP Script where Boxes Width are based on CH for ex..
    BOX YPOS 1 LN WIDTH 3 CH HEIGHT 1 LN FRAME 1 TW'
    BOX YPOS 1 LN  XPOS 3 CH WIDTH 18 CH HEIGHT 1 LN FRAME 1 TW
    Now i have to populate the value in that 2 box with some values say mandt and matnr which are 3 and 18 char in length (Keeping those length in mind i desined the boxes)
    When i use Courier Font Size 12 , it fits fine in box boxes but when i use font size 8 then everything is messed up...
    It start up properly then the first character of matnr is displayed in the first box...
    How do i determine the box size width based on the font size ...
    In SAP Script header setting i have char/inch set up as 10 --Would that make any difference
    Please the client needs in SAP Script only...
    Thanks

    Any suggestions will be appreciated

  • How to increase font size in Java script alert message

    Is anybody know how to increase font size in Java script alert message
    THanks in Advance ....

    Hi,
    You can NOT do it with Javascript.
    You need an alternative solution: http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/popup-box_84.html
    Tobias

  • Change array index font size using VI scripting

    Hello All,
                         I have a array control in my front panel, I'm wondering is there any way to change that "array index" font size using VI scripting?
    Example:
    1. I have this array
    2. Manually I have changed the font size of the array in "Selection Font" panel as below
    3. Through VI scripting I'm able to control control font size, label font size.,.. But not the index font size. So it looks odd.
    4. I'm expecting to be modify this array as same as picture 1 through VI scripting.
    Note: It may not have any practical application, but some time it will be helpful for the programmers to make a quick drop. If anybody have any idea, please share.
    <Electro Sam>
    ELECTRO SAM
    For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
    - John 3:16

    Raven - you are right, Actually I'm looking for options to change the font size of the array index.
    Actually we have coding standard to follow. In that, all the front panel controls needs to be in Font size 14 and the size should be 25X120, so I'm trying to write a code which automatically converts the VI FP control sizes to be in standard size.
    I'm not only using one customer VI, I'm handling various customer VIs, so each one VI FP control sizes are different. So I'm developing this utility to standardize the VI's as per the guidelines we have.
    Except this array index most of the VI FP control elements I have handled, Only this array is troubling me.
    Appreciate your support guys, please share your thoughts.
    <ElectroSam>
    ELECTRO SAM
    For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
    - John 3:16

Maybe you are looking for