TLFText needs to fit width of text box.

I used classic text before and this code works.
var myFormat:TextFormat = dtb.getTextFormat();
     while(dtb.textWidth>=dtb.width)
          myFormat.size = int(myFormat.size) - 1;
            dtb.setTextFormat(myFormat);
          trace("best is: " +myFormat.size);
          trace("dtb.textWidth: " + dtb.textWidth);
     myFormat.size = int(myFormat.size) - 1;
     dtb.setTextFormat(myFormat);
but I need to switch the text boxes over to TLFText because we are going multi-language, and this function no longer works, I have no idea how to do the same thing with TLFText?
Thanks

solved it.
function fontSizeChanger(dtb:TLFTextField):void
     if(dtb.text.length > 0 && dtb.textWidth>dtb.width)
               var fmt:TextFormat = new TextFormat(dtb.textFlow.hostFormat.fontFamily,dtb.textFlow.hostFormat.fontSize);
               while(dtb.textWidth>=dtb.width)
                    fmt.size = int(fmt.size)-1;
                    dtb.setTextFormat(fmt);

Similar Messages

  • I designed a document in indesign but i need to add a formatted text box to it

    I've created an indesign document with an interactive text box, but when I open it in Acrobat, the formatting is stripped from the indesign document in the field where I need it. How do I keep the formatting used on the indesign document so that when someone fills in the content on the PDF in Acrobat, the formatting sticks?

    WHat specifically do you mean by formatting? Just the font name?

  • I can't see text that need to be type on text boxes to finalize a post or cancel/change accounts in certain webpages

    Every time I need to post ask something in a certain web page y have a last step asking me to type two words into a text box to finalize my post,but I can't even see the words, not even refreshing the page, same thing when I want to cancel an account in another web page they ask me to type the words in a security box, but I don't see any words, is there something into my internet configuration I need to change? please help!

    See:
    * http://kb.mozillazine.org/Images_or_animations_do_not_load
    * You can see the permissions for the domain in the current tab in Tools > Page Info > Permissions
    * You can see image settings in Tools > Options > Content: Load Images
    * You can see all exceptions in Tools > Options > Content: Load Images > Exceptions
    * You can check the Tools > Page Info > Media tab for blocked images (scroll through all the images)
    There are also extensions (Tools > Add-ons > Extensions) and security software (firewall) that can block images.

  • Fitting into the Text boxes

    HI
    I am trying to fill out an application on Adobe Reader and some of the spaces are a bit short and do not allow me to competely answer the questions.  Is there a way to either reduce font ot create 2 lines within the text box to allow for more space?  I am using Adobe Reader 9.5.3 and MAC OS X 10.6.8.  Any suggestions?  Thanks.

    Run a script (either from folder-level or the console) that uses getField and then sets the desired property. Most properties are accessible if form rights are enabled.
    Also, getNthFieldName and numFields are accessible in Reader, so you can easily list all of the fields in the file.

  • Set default width for text box in Adobe Acrobat X

    Hello!
    I am using the textbox tool to add comments to a document. (not the Typewriter, but the Textbox, since that has more flexibility for formatting the text).
    I know how to set the default proprties for text size, color, background color, etc.
    Cannot figure out however to to set the default width. Every time I try to add a new textbox, it defaults to about 1 or 2 inches wide, so the text wraps around and around, and then I have to resize the box when I am done.
    Is there a way to change the default width?
    Thanks!

    Hi, Amonra
    I drew a box I like, and select, and then, Ctrl+C, and then Ctrl+V.
    And move the pasted box where to need, and resize the length. At least I get same width boxes.
    I don't know how to default it.
    I hope it may help you.

  • Embedding Images in a scrolling text box

    I used the Flash help files to get the dynamic text box set
    up for scrolling via the Property Inspector. I have Multiline
    wrapping text and the HTML buttons active. The help files don't
    tell you where to put the <img src> tag to reference the
    images I need to embed in the text box. I'm not an ActionScripting
    expert, though I can do the basics--help!

    The code helps a bit, thank you. Where does it go?
    The actionscripting panel says I can't apply actionscript to
    the text field. Does it attach to the keyframe the text field is
    located in?
    If I am supposed to put the actionscript in the keyframe the
    scrolling text field is located in, how can I set the width and
    height of the image, and tell Flash where the image should be
    placed in the text field?
    Finally, I need to have a row of three images, same height,
    different widths, with a line of text above and another line of
    text below. How would I do this?
    Thanks in advance for your help!

  • Adobe Acrobat 9 Standard Text Box Enter Space is Removed -- Help

    Got a new computer at work with Adobe Acrobat 9 Standard and it is taking some getting use to (came from Acrobat 7 Professional).
    I need some help with  the text box tool.  When I create a text box and use the enter key and click out of the text box the space is removed where I hit enter.  I googled around and if I use cntrl and then hit enter the space will stay there.  How do I get around this so I do not have to hold cntrl everytime.  Plus if I go back into that text box and add another space it removes the space from before so I would have to add the spaces in again.  I hope this is a setting I have messed up.  It is quite annoying and hopefully someone can help me out. 
    I am on Windows 7 Professional if it matters.

    I've reported this as a bug a number of times since Acrobat 9 was released and so far they have refused to fix it in Acrobat 9/10/11. I had never heard of the Ctrl+Enter workaround, so thanks for that.

  • Creating a text box for someone to type in to.

    Please can someone direct me... I need to create a simple
    text box within a flash movie, which will allow the web user to
    type information into. The information does not need to be sent
    anywhere (i.e. is just for their own use), we just require the user
    to them be able to print out the page, with the text box contents.
    many thanks

    use INPUT as text type instead of STATIC

  • Font size in PDF form (text boxes)

    Hi!
    I have an application form as a PDF which I have to print and send back. But the text isn't fitting into the text box, so I get a scroll bar. Now I either have to change the font size or change the size of the text box. But I couldn't find out how to, neither in Reader 8 nor in 9.
    Another Option would be to export it as a jpg or something. Can I do that somehow?
    Greetings

    > I can't imagine there's no way to change the font size...
    Yes, the form designer can change the font size. So can you if
    (a) you buy the same software - Acrobat Pro, and
    (b) the form is not protected - locked - by the form designer.
    Aandi Inston

  • Dynamic Text box with linking to frames

    I have a problem. I've tried everything I can think of and what I have Googled, but nothing has helped. I have a scrolling dynamic text box and I need some words in that text box to link to frames, like buttons (Not a URL). This is the file and the frame I'm on is "conflictNorthernPlains"     https://dl.dropbox.com/u/72608572/civilWarEra7.zip
    Thanks

    use:
    var tf:TextField = new TextField();
    addChild(tf);
    tf.htmlText = "<a href='event:frame1'>link to  frame1</a><br/>";
    tf.htmlText += "<a href='event:frame2'>link to frame2</a><br/>";
    tf.addEventListener(TextEvent.LINK, tfF);
    function tfF(e:TextEvent):void{
    gotoAndStop(e.text);
    p.s.  please mark helpful/correct responses, if there are any.

  • Labview 8: continuous cursor in text box

    Hi,
    I have made a basic instant messenger program with a text box that sends a message via a com port. When I press enter a "Send" button is operated and the string is sent, I then clear the text box. However to type another message the user has to click the text box again to bring up a cursor to type the next message. I would like the cursor to stay in the text box so the user doesn't need to click on the text box to type something else. I would also like to do this at the beginning of the program as well.
    Any suggestions?
    Thanks,
    Solved!
    Go to Solution.

    Ues a property node to set "Keyfocus" True.
    Ben
    (aka Fuzz Bear )
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Linked Text Boxes

    I need to create a linked text box allows text to automatically flow from say the bottom of page 1 to the top of page 2. I created a two page document using the "blank" template. Page 1 is 2-column and Page 2 is single column. Text is not flowing from Page 1 to Page 2.
    The article below states "You can't link existing text boxes." ...
    http://docs.info.apple.com/article.html?artnum=165720
    ... does that mean I would literally have to delete Pages' text boxes and add my own in manually, then link them? (If so I find that difficult to believe that a user would have to go through so much manual work for something so simple).
    If I have to do this manually, how do I delete Pages' text boxes so I can put my own in the same place?
    MacBook Pro (Intel)   Mac OS X (10.4.9)  

    Welcome to the forums!
    If you want to flow text from two columns to a single column, you do indeed need to use manual boxes -- there is no way (currently) in Pages to do this with the "default" text boxes. You don't need to delete Pages default boxes (and in fact you can't) -- instead, just stretch a box of the appropriate size on the page, pour all the text into it that you have, and when it overfills, click the small blue "tab" at the right side of the box to create a second text box that is linked to the first. This one can be moved where you like, including to a new page.

  • In InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to

    This may be a basic question... but in InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to determine what word count we can fit in, and c) how to do it in a table? Thanks!

    Set your ruler increments to pixels Preferences>Units & Increments. You can fill the text box with placeholder text Type>Fill with Placeholder text and get a word count from the Info panel with Show Options turned on from the flyout.
    From the Transform panel you can set a text box's width and height

  • Text wrap for a paragraph: How to define the width of a Text box /  active text area? I simply need a longish text to wrap within the frame!

    Hello, I've been searching for a good while in the forums now, but have found no solution or real mention of the problem – I hope some of you can help.
    I want to very simply layout a text between scenes, a slightly longer text that wraps within the frame margins. Here's an example of how I want it to look:
    Now, I couldn't for the life of me get the Custom Text to behave like that, as there are no parameters to set for the width of the text area. The Text Size, yes, along with the Tracking, Baseline and all that, but the width of the text box, no. The above was created by customizing one of the other Text Generator presets that happened to be left aligned.
    However, this preset has a fade in/fade out transition, which I do not want. There's no way to remove this transition as it seems integrated into the Text Generator (meaning they are not really presets, but separate kinds of Text objects? Very silly.)
    So I am asking you: Is there any way to get the Custom Text generator to behave like that? Just a text paragraph as above. Below you'll see all I can manage with the diffferent Custom Text parameters. Any kind of repositioning and resizing of the text just changes the position and size of the frame – but the actual text items are just cropped off where they extend out of that frame. Apparently the bounding box for the text is just some default length, and I can't find any way to adjust the width. See below my different attempts.
    The same text pasted into a Custom Text generator clearly extends outside the frame:
    Here Transform just moves – or resizes – the video frame that the Text Box exists inside:
    The Crop gives similar results, and of course Distort doesn't get me closer to what I need, either. There should be simply a Text Box Width parameter to set somewhere, but if it exists they have hidden it very well. How do you do it?
    Thanks for any help, this is a silly problem, but one of now many trivial problems that amount to me growing quite dissatisfied with FCPX. Hopefully I've just overlooked something.
    All the best,
    Thomas

    Thomas...same kind of crap here.
    I used Custom Text - entered a sentence, hit return, entered another.
    Set to 72 pt.
    The default alignment is centred - I want left aligned text...the text start point stays at the centre of frame and the sentence runs off the edge of the bounding box.
    There is no settings in the Text or Title inspector dialog to correct that!
    Using Transform will not sort it!

  • Help filling out PDF - How can I get text to fit in text boxes?

    I need to fill out an application that is in the PDF format.
    When I filled it out, there were a few text boxes where the text did not wrap around.
    In other words, some of the text doesn't show.
    There is not enough space for what I typed.
    When I printed it out, the text was still blocked out.
    How can I get the text to fit in the box?

    Thank you so much for your help, try67!
    Was hoping for a solution on my end, but judging by your MVP status, you seem to now what you're doing! :-)

Maybe you are looking for