dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Scale Textbox

  1. #1

    Scale Textbox

    i'm making textboxes with createTextField, but I can't seem to figure out how to make the width of it proportional to the amount of characters in the box--I want the box to be exactly the same size as the words in the box.

    This is so they all align up properly without gaps.

    Any way of doing this?

    I tried measuring characters to pixels in the bounding box, but the problem is different letters have a different pixel length

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Location
    Pittsburgh
    Posts
    252
    Hi Jason,

    I may not be following but something like this will create a textfield, set the autoSize prop to true, fill it and it will be 1 line of text...

    Code:
    this.createTextField("test", 5, 0, 0, 0, 0);
    test.autoSize = true;
    test.text = "i'm making textboxes with createTextField, but I can't seem to figure out how to make the width of it i'm making";
    Dunc

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