HDividedBox 手风琴列表调整大小

发布于 2024-12-05 01:36:34 字数 1373 浏览 1 评论 0原文

我想使用 HDividedBox,但遇到调整大小问题。 事实上,当我减少手风琴组件的宽度时,列表并没有减少。 在下面找到我的代码

<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%"
                                    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>

感谢您的帮助

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%"
                                    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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疑心病 2024-12-12 01:36:34

尝试将列表的高度和 NavigatorContent 设置为 100%。

抱歉我之前的回复。事实上,我把“宽度”这个词误读成了“高度”:(
我尝试重现该问题,发现在特定级别上,列表不会进一步缩小。

<?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>

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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文