开发者

HDividedBox Accordion List resize

I'd to use a HDividedBox and I have resize problem. Indeed, when I reduce the width of accordion component, the list is not reduce. Find below my code

<mx:HDividedBox width="100%"
                                height="100%"
                                color="0x323232">

                    <mx:Accordion width="40%" height="100%" >
                        <s:NavigatorContent width="100%" label="Courriers">
                            <s:List id="liCourriers" borderVisible="false"
                                    width="100%"
                                开发者_Go百科    change="itemCOIndexChangeHandler(event)" dataProvider="{DP_PAT_COURR}">

                            </s:List>
                        </s:NavigatorContent>

                        <s:NavigatorContent width="100%" height="100%" label="Courriers Images">
                        </s:NavigatorContent>

                        <s:NavigatorContent width="100%" height="100%" label="Docs Entrant">
                        </s:NavigatorContent>
                    </mx:Accordion>

                    <mx:HTML height="100%"
                             width="60%"
                             id="coContent"
                             borderVisible="true"
                             >

                    </mx:HTML>
                </mx:HDividedBox>

Thanks for helping


Try to give height to your list and NavigatorContent to 100 percent.

Sorry for my earlier response. Indeed I misread the word WIDTH as height :( I tried to reproduce the problem and found that at a particular level, list does not shrink any further.

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       creationComplete="onCreationComplete(event)">
    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import mx.events.FlexEvent;

            protected function onCreationComplete(event:FlexEvent):void
            {
                var coll:ArrayCollection = new ArrayCollection();
                for(var i:int; i < 1000; i++)
                {
                    coll.addItem(i.toString() + 'Some lengthy string need to be attached.');
                }
                liCourriers.dataProvider = coll;

            }

        ]]>
    </fx:Script>
    <mx:HDividedBox width="100%"
                    height="100%"
                    color="0x323232">

        <mx:Accordion id="accordion" width="40%" height="100%" >
            <s:NavigatorContent id="nc" width="100%" label="Courriers">
                <s:List id="liCourriers" borderVisible="false"
                        width="100%">

                </s:List>
            </s:NavigatorContent>

            <s:NavigatorContent width="100%" height="100%" label="Courriers Images">
            </s:NavigatorContent>

            <s:NavigatorContent width="100%" height="100%" label="Docs Entrant">
            </s:NavigatorContent>
        </mx:Accordion>
        <s:Panel title="Panel" width="100%">
            <s:layout>
                <s:VerticalLayout paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10"/>
            </s:layout>
            <s:Label text="{'Accordion width: '+accordion.width}" width="100%"/>
            <s:Label text="{'Navigator Content width: '+nc.width}" width="100%"/>
            <s:Label text="{'List width: '+liCourriers.width}" width="100%"/>
            <mx:HTML height="100%"
                     width="60%"
                     id="coContent"
                     borderVisible="true"
                     >

            </mx:HTML>
        </s:Panel>
    </mx:HDividedBox>
</s:WindowedApplication>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜