Instead of manipulating the width just use the includeInLayout property (set to false when visible is false).
Regards, Evyatar On Sun, Dec 1, 2013 at 8:21 PM, <[email protected]> wrote: > I have a spark FormItem containing a spark TextInput. Throughout the app > this is made visible and invisible. When it is invisible, I want the width > to be 0 so that it doesn't effect the layout other (visible) form items. > > Is there a simple way upon turning it back to visible, that I can have it > auto-size itself to the correct width, or must I hardcode the width? Just > curious, as I have a lot of such FormItems, and an auto-size method would > save a lot of development time, especially as things change. For example, > if I set the width to be -1, will this trigger the component to auto-size > itself? >
