flash - Set Flex component width to 100% at runtime? -


If I am creating an input field through MXML , then I 100% . But I can not do this on a runtime through an action script.

This works:

  & lt; Mx: text input ... width = "100%" />  

This collection is used, width is a number, a string does not say:

  var textinp: TextInput = new TextInput (); SomeContainer.addChild (textinp); Textinp.width = "100%"  

How do I set 100% as the size on the component created on the runtime through the action script?

instead of width instead of percentwidth Use the attribute.

Then, the third line of your code will be:

  textinp.percentWidth = 100;  

It slipped me for a while too.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -