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 -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -