No, it doesn't work. As my following example shows, the Form will not
- either when its first instantiated or later programmically - resize
such that its children's widths are reduced. This is what a Form
should be able to do to be generically reusable in different screen
space situations (within reason, of course).

BTW, specifying the child FormItem(s), their children as flexible (%
width) doesn't make any difference, either.

------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";>
<mx:FormHeading label="My Form Heading">
</mx:FormHeading>
<mx:Form id="form" width="50%" backgroundColor="blue">
<mx:FormItem label="My FormItem 1 Label">
<mx:TextInput text="This is the first TextInput Control and it
has a rather lengthy value, in order to make the form's original with
value quite large." />
</mx:FormItem>
</mx:Form>
<mx:Button label="Resize Form" click="form.width = '10%'" />
</mx:Application>

------------------------------------------------------



--- In [email protected], Manish Jethani
<[EMAIL PROTECTED]> wrote:
> extensive_systems wrote:
> 
> > I'd like to be able, in effect, to say something like <MyForm
> > width="75%"> (and get a smaller form with shorter fields that could be
> > fit into less screen space). AFAIK, specifying a width percentage at
> > runtime does nothing in the case of Form.
> 
> <mx:Form id="form" width="100%" backgroundColor="blue">
> ...
> </mx:Form>
> <mx:Button label="Resize Form" click="form.width = '80%'" />
> 
> Works.
> 
> Manish





Reply via email to