Hey people,
Im struggling with the textfield class. I have a contact form with name, email, enquiry but i am having trouble with the textfield width:
For example, i have a sprite.
var s:Sprite = new Sprite();
s.width = 200;
s.height = 20;
addChild(s);
var tf:TextField = new TextField();
td.input = true;
s.addChild(tf);
The problem is i need the textfield to stay at the width of its parent sprite. You would think perhaps that setting a max character would be the way forward, and that is what i have, but its not good… i mean:
WWWWWWWWWWWWWWWWWWWWWWWWW is much larger than
iiiiiiiiiiiiiiiiiiiiiiiii
Yet they both contain 25 characters. So although it is maxed out it looks stupid.
textField.width is a read only property
textField.autosize = TextFieldAutoSize.NONE seems totally pointless because if i cant set a width before setting the Autosize to false then it means i need to fill up the textfield with just enough " "'s then force the user to delete this before wititng.
Im not really the biggest user of textfield really as i am a hobbiest but this has got me shouting at anyone silly enough to visit me!
Any help would be grand,
Cheers.