Hi,
The VBox contains a repeater which creates a bunch of comboboxes.
<mx:VBox id="attributesBox" height="100%" width="100%">
<mx:Repeater id="att"
dataProvider="{mx.utils.ArrayUtil.toArray(dataObject.Attributes.Attribute)}">
<mx:HBox>
<mx:Label id="attLb" text="{att.currentItem.Name}" width="75"
height="15" styleName="labeltitle" />
<mx:ComboBox id="itatt"
dataProvider="{mx.utils.ArrayUtil.toArray(att.currentItem.Attvalues)}"
width="150" height="18"/>
</mx:HBox>
</mx:Repeater>
</mx:VBox>
and in my AS method I check if the repeater will create anything or
not and try to hide it or show it.
function comboChange():Void
{
dataObject = marketingItems.selectedItem;
if (dataObject.Attributes.Attribute.length == null ||
dataObject.Attributes.Attribute.length<=0)
{
attributesBox.height=0;
attributesBox.width=0;
attributesBox.visible=false;
}else
{
attributesBox.height=250;
attributesBox.width="100%";
attributesBox.visible=true;
}
}
As you can see when I set the width="100%" it works but if I try to do
the same with height it does not, but if I give it a numerical value
it works fine.
Rajesh J
--- In [email protected], "Deepa Subramaniam" <[EMAIL PROTECTED]>
wrote:
>
> Hm, I think I need some sample code to show what is going wrong before I
> can help you out more. Are the children of the VBox themselves using
> percentage based sizes? Do any of the children have explicit x, y
> positions set?
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Rajesh Jayabalan
> Sent: Thursday, October 20, 2005 11:32 AM
> To: [email protected]
> Subject: [flexcoders] Re: % in as
>
> Yes I am using 1.5 and I found I can set width="100%" and it works but
> when I try the same for height="100%" for a VBox it does not all the
> components in it are overlapping each other.
>
> Rajesh J
>
> --- In [email protected], "Deepa Subramaniam" <[EMAIL PROTECTED]>
> wrote:
> >
> > Ah, you must be using Flex 1.5? In Flex 1.5 percentWidth/percentHeight
> > are read only and you want to do something like:
> >
> > myButton.width="100%";
> >
> >
> >
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> On
> > Behalf Of Rajesh Jayabalan
> > Sent: Thursday, October 20, 2005 11:09 AM
> > To: [email protected]
> > Subject: [flexcoders] Re: % in as
> >
> > Hi
> >
> > I tried that and get an error
> >
> > Type mismatch in assignment statement: found Number where Function is
> > required
> >
> > also in the documentation it says its a readonly field
> >
> > Regards
> > Rajesh J
> > --- In [email protected], "Ashish Goyal" <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > There is a property called percentWidth for setting percentage width
> > in
> > > AS.
> > >
> > > Component.percentWidth = 100;
> > >
> > > Similarly you can use percentHeight to set height in percentage.
> > >
> > > -Ashish
> > >
> > >
> > > > -----Original Message-----
> > > > From: [email protected]
> > > > [mailto:[EMAIL PROTECTED] On Behalf Of Rajesh Jayabalan
> > > > Sent: Wednesday, October 19, 2005 5:15 PM
> > > > To: [email protected]
> > > > Subject: [flexcoders] % in as
> > > >
> > > > Hi,
> > > >
> > > > Anyone know how to set width=100% in actionscript method for any
> > > > component?
> > > >
> > > > Regards
> > > > Rajesh J
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ------------------------ Yahoo! Groups Sponsor
> > > > --------------------~-->
> > > > Get Bzzzy! (real tools to help you find a job). Welcome to
> > > > the Sweet Life.
> > > > http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
> > > > --------------------------------------------------------------
> > > > ------~->
> > > >
> > > > --
> > > > Flexcoders Mailing List
> > > > FAQ:
> > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > > Search Archives:
> > > > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
>
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/