2011-09-15 49 views
0

我想使用HDividedBox並調整大小問題。 確實,當我縮小手風琴部件的寬度時,清單並未減少。 下面找到我的代碼HDividedBox Accordion List resize

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

感謝您的幫助

回答

0

嘗試給予高度列表和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> 
+0

謝謝,但這個問題上水平方向存在,所以我不看不出爲什麼給高度可以解決這個問題? – Flex60460