dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Autosizing TextFields--height, but not width

  1. #1
    Registered User
    Join Date
    Nov 2000
    Posts
    136
    I've got a dynamic text field; I'm loading its text from an outside source, so I don't really know what the text is going to be, or how many characters it will have. I would like the text field to automatically resize itself to show all of its text. However, I don't want the width to change.

    In other words, I want a text field that works the same way they do inside the Flash authoring environment. After you set the width of a text field with the little square in the corner of the bounding box, the width won't change regardless of how much text you put in. Instead, the text wraps around to the next line, and the height of the field is automatically adjusted.

    Is there any way to do this?

  2. #2
    Danny Gomez Creations cosmiceye's Avatar
    Join Date
    Mar 2002
    Location
    under a palmtree in Jamaica waiting for psytopia 2005 to begin
    Posts
    982
    having the same problem....
    well, what we could do is to make a textfield the widest width we could think of and then take the width of the character "M" and multiply that width string.length of the variable for the textfield and pass it to set the width of the square....messy....

  3. #3
    Registered User
    Join Date
    Nov 2000
    Posts
    136
    Yeah, your suggestion might be the most practical solution available. Grr. You'd think this would have been an obvious feature for text fields.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center