hey I have a simple UIComponent that contains some other children then
in updateDisplayList I clip the visible area of the parent
 override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number) : void{
                super.updateDisplayList(unscaledWidth, unscaledHeight);

                var boundary : Rectangle = new Rectangle(0, 0, unscaledWidth,
unscaledHeight);
                this.scrollRect = boundary;
                .....
and simply layout all children in some way.
                for each(renderer in rendersMap.getValues()){
                                renderer.x = pos;
                                pos += renderer.width + gap;
                }
                //this.explicitWidth = this.width; this.explicitHeight =
this.height;
                this.measuredWidth = pos - gap;
                this.measuredHeight = unscaledHeight;
}
and now there is no problem as long as I use explicit values for width
and height of my component somewhere in mxml or in as3.
        <mx:Canvas width="828" height="506">
                <component:NavigationButton direction="right" visible="true"
width="20" height="19"
                        click="{projectsList.selectedAt++}" verticalCenter="0" 
right="0"/>
                <component:NavigationButton direction="left" visible="true"
width="20" height="19"
                        click="{projectsList.selectedAt--}" verticalCenter="0" 
left="0"/>
                <kitcomponent:List id="projectsList"
                        itemRenderer="{SubSectionLink}" dataProvider="{new 
XMLListCollection
(applicationXML.sections.section.(@name == 'prints').project)}"
                        layout="horizontal" gap="2"
                        change="hndProjectSelected()" width="400" height="180" 
x="0" y="0" /
>
        </mx:Canvas>
then all values explicitW/H are set and my list is visible

but if I do something like this
        <mx:Canvas width="828" height="506">
                <component:NavigationButton direction="right" visible="true"
width="20" height="19"
                        click="{projectsList.selectedAt++}" verticalCenter="0" 
right="0"/>
                <component:NavigationButton direction="left" visible="true"
width="20" height="19"
                        click="{projectsList.selectedAt--}" verticalCenter="0" 
left="0"/>
                <kitcomponent:List id="projectsList"
                        itemRenderer="{SubSectionLink}" dataProvider="{new 
XMLListCollection
(applicationXML.sections.section.(@name == 'prints').project)}"
                        layout="horizontal" gap="2"
                        change="hndProjectSelected()" left="28" right="320" 
bottom="168"
top="158"/>
        </mx:Canvas>
then list disappear even if I set manually in code explicit values,
what do I do wrong? but this is not a first time I notice something
like that happens, I had similar effect while working with Box
component that was stretched to it's parent size in AS3

or maybe it is because I set measured values of my component in
updatedisplayList method (where I iterate over my children anyway to
layout them) and not in measure() (where I should go through all
children additional time)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to