2009-03-16 13 views
0

私はそうのようなキャンバス内のVBoxの内部に複数のHBoxesを持っている:キャンバスに重複するVBoxの子を修正するにはどうすればよいですか?

<?xml version="1.0" encoding="utf-8"?> 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*"> 
<mx:Canvas width="600" height="500"> 
     <mx:VBox height="100%" left="10" right="10"> 
     <mx:HBox width="100%" > 
     <mx:VBox width="48%" height="100%" horizontalAlign="left"> 
     <mx:Label text="Label" /> 

     </mx:VBox> 

     <mx:VBox width="48%" height="100%" horizontalAlign="left"> 
     <mx:Label text="Label" /> 
     <mx:HBox width="100%"> 
      <mx:VBox width="48%"> 
       <mx:Label text="Label" /> 
       <mx:ComboBox /> 
      </mx:VBox> 

     </mx:HBox> 
     </mx:VBox> 


     </mx:HBox> 
     <mx:VBox> 
      <mx:HBox> 
       <mx:Label text="Label" /> 
       <mx:Label text="Label" /> 
      </mx:HBox> 
     </mx:VBox> 
     <mx:HBox> 
      <mx:Label text="Label" /> 
      <mx:ComboBox/> 
     </mx:HBox> 
     <mx:HBox> 
     <mx:VBox horizontalScrollPolicy="off" verticalScrollPolicy="off" 
     includeInLayout="false" > 
     <mx:Label text="Label" /> 

     </mx:VBox> 
     <mx:VBox> 
     <mx:HBox horizontalScrollPolicy="off" verticalScrollPolicy="off" 
      includeInLayout="false" 
      > 
      <mx:VBox > 
        <mx:Label text="Text" /> 
        <mx:ComboBox /> 
      </mx:VBox> 
      <mx:VBox> 
        <mx:Label text="Label" /> 
        <mx:ComboBox /> 
      </mx:VBox> 
     </mx:HBox> 
     <mx:HBox horizontalScrollPolicy="off" verticalScrollPolicy="off" 
      includeInLayout="false" 
      > 
      <mx:VBox> 
       <mx:Label text="Label:"/> 
       <mx:ComboBox /> 
      </mx:VBox> 
      <mx:VBox> 
       <mx:Label text="Label: "/> 
       <mx:ComboBox /> 
      </mx:VBox> 
     </mx:HBox> 
     </mx:VBox> 
     </mx:HBox> 
     <mx:HBox > 
      <mx:Label text="Label:" /> 
      <mx:CheckBox /> 
     </mx:HBox> 
     </mx:VBox> 
    </mx:Canvas> 
</mx:Application> 

のVBoxの最後の子供が他のコンポーネントと重なっています。 キャンバス内のVBoxの子が重ならないようにするにはどうすればよいですか?この状況をどのようにデバッグしますか?

私は次のことを試してみました:

  • IncludeInLayout =真

Sceenshotサイジングベースパーセントの削除 - ラベルやチェックボックスの重複: alt text http://i43.tinypic.com/25qb1cm.jpg

+0

問題のスクリーンショットを投稿できますか? – Huuuze

+0

スクリーンショットが投稿されました。 – Brandon

+0

とにかくincludeInLayout = "false"を使用する目的は何ですか? –

答えて

0

をそれを言うのは難しいです情報は提供されていますが、最初に気になる2つの質問は次のとおりです。

  1. あなたのVBoxの高さは、その子の高さの合計よりも大きいですか?
  2. VBoxにverticalGapプロパティを設定しましたか? verticalGapは子の垂直方向の間隔を決定します。
+0

1.高さは100%です。 2.これをゼロに設定しようとしました。 助けてくれてありがとう。 – Brandon

0

私はこの(AIRアプリケーション)を試してみました。

<?xml version="1.0" encoding="utf-8"?> 
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> 


    <mx:Canvas height="100%" width="100%" 
     borderStyle="solid" 
     backgroundColor="0x0000ff"> 

     <mx:VBox height="100%" width="100%"> 

     <mx:VBox backgroundColor="0xff0000" height="50%" width="100%"> 
      <mx:HBox backgroundColor="0x000000" height="50%" width="50%"/> 
      <mx:HBox backgroundColor="0xffffff" height="50%" width="50%"/> 
      <mx:HBox backgroundColor="0x00ffff" height="50%" width="50%"/> 
     </mx:VBox> 

    <mx:HBox height="50%" width="100%" 
     backgroundColor="0xff0000" backgroundAlpha="0.5" 
     borderColor="0x000000" borderStyle="solid" borderThickness="1"/> 

    </mx:VBox>   

    </mx:Canvas> 



</mx:WindowedApplication> 
0

これらのコンポーネントのうちのいくつかのincludeInLayoutプロパティを、visibleプロパティで使用されるものと同じ条件にすることでこれを解決しました。

問題の原因はわかりません。

関連する問題