-1

我正在使用 Flex 3.0。我正在尝试将 VBoxes 嵌套在 TabNavigator 中,并且效果很好。但是在我的第一个 VBox 中,我有两个不会显示的按钮。无论如何,我对设计概念并不擅长,而且对 Flex 很陌生。我尝试过使用 Hbox 弄乱宽度和高度属性。有人可以看看并弄清楚我可以做些什么来解决这些问题。这是完整的面板。TabNavigator 靠近底部。

<mx:Panel id="pnlMain" label="Address Search" width="100%" borderStyle="none" headerHeight="0">
    <mx:ViewStack id="vsAddressSearch" resizeToContent="true">
        <mx:Form id="frmAddressSearch" styleName="measureForm" width="300" height="100%" fontFamily="Arial" fontSize="11" verticalGap="0" horizontalGap="0" verticalScrollPolicy="off" horizontalScrollPolicy="off">
            <mx:FormItem label="Address:" paddingBottom="5" paddingTop="5" textAlign="left" fontWeight="bold" width="100%">                
                <mx:TextInput width="100%" id="txtAddress" text=""/>            
            </mx:FormItem>  
            <mx:HRule height="5" width="100%"/> 
            <mx:HBox horizontalAlign="left" paddingTop="5">
                <mx:Button label="Find Address" click="BingFindAddress()"/>     
                <mx:Button label="Clear" click="clearGraphics()"/>  
            </mx:HBox>              
        </mx:Form>
        <mx:Form id="frmAddressSearch1" styleName="measureForm" width="100%" height="100%" fontFamily="Arial" fontSize="11" verticalGap="0" horizontalGap="0" verticalScrollPolicy="off" horizontalScrollPolicy="off">
            <mx:FormItem label="Street:" paddingBottom="5"  labelWidth="150" textAlign="left" fontWeight="bold">                
                <mx:TextInput width="100%" id="address" text=""/>            
            </mx:FormItem>            
            <mx:FormItem label="City:" paddingBottom="5" labelWidth="150" textAlign="left" fontWeight="bold">                
                <mx:TextInput width="100%" id="city" text=""/>            
            </mx:FormItem>   
            <mx:FormItem label="State/Province:" paddingBottom="5"  labelWidth="150" textAlign="left" fontWeight="bold">                
                <mx:TextInput width="100" id="state" text="PA"/>            
            </mx:FormItem>            
            <mx:FormItem label="ZIP Code or Postal Code:" fontWeight="bold" labelWidth="150"  textAlign="left" paddingBottom="5" >                
                <mx:TextInput width="100" id="zip" text=""/>            
            </mx:FormItem>            
            <mx:FormItem label="Country:" paddingBottom="5"  labelWidth="150" textAlign="left" fontWeight="bold">                  
                <mx:ComboBox id="country" selectedIndex="0">                    
                    <mx:ArrayCollection>     
                        <mx:String>USA</mx:String>                   
                        <mx:String>Canada</mx:String>                        
                        <mx:String>Mexico</mx:String>                    
                    </mx:ArrayCollection>                
                </mx:ComboBox>            
            </mx:FormItem>       
            <mx:HRule height="5" width="100%"/> 
            <mx:HBox horizontalAlign="left" paddingTop="5">
                <mx:Button label="Find Address" click="ESRIFindAddress()"/>     
                <mx:Button label="Clear" click="clearGraphics()"/>

            </mx:HBox>     
        </mx:Form>
        <mx:Form id="frmAddressSearch2" styleName="measureForm" width="100%" height="100%" fontFamily="Arial" fontSize="11" verticalGap="0" horizontalGap="0" verticalScrollPolicy="off" horizontalScrollPolicy="off">
            <mx:FormItem  label="Street:" paddingBottom="5"  labelWidth="150" textAlign="left" fontWeight="bold">                
                <mx:TextInput width="100%" id="bamAddress" text="273 Cumberland St"/>            
            </mx:FormItem>            
            <mx:FormItem  label="City:" paddingBottom="5" labelWidth="150" textAlign="left" fontWeight="bold">                
                <mx:TextInput width="100%" id="bamCity" text="Harrisburg"/>            
            </mx:FormItem>   
            <mx:FormItem  label="State/Province:" paddingBottom="5"  labelWidth="150" textAlign="left" fontWeight="bold">                
                <mx:TextInput width="100" id="bamState" text="PA"/>            
            </mx:FormItem>            
            <mx:FormItem  label="ZIP Code or Postal Code:" fontWeight="bold" labelWidth="150"  textAlign="left" paddingBottom="5" >                
                <mx:TextInput width="100" id="bamZip" text="17102"/>            
            </mx:FormItem>            
            <mx:FormItem label="Country:" paddingBottom="5"  labelWidth="150" textAlign="left" fontWeight="bold">                  
                <mx:ComboBox id="bamCountry" selectedIndex="0">                    
                    <mx:ArrayCollection>     
                        <mx:String>USA</mx:String>                   
                        <mx:String>Canada</mx:String>                        
                        <mx:String>Mexico</mx:String>                    
                    </mx:ArrayCollection>                
                </mx:ComboBox>            
            </mx:FormItem>       
            <mx:HRule height="5" width="100%"/> 
            <mx:HBox horizontalAlign="left" paddingTop="5">
                <mx:Button label="Find Address" click="BAMFindAddress()"/>     
                <mx:Button label="Clear" click="clearGraphics()"/>     
            </mx:HBox>     
        </mx:Form>
    </mx:ViewStack>
    <mx:VBox id="frmShell" backgroundAlpha=".7" backgroundColor="#dddddd" visible="false" left="0" top="0" width="100%" height="100%"></mx:VBox>
    <mx:Text id="hintLabel" fontSize="10" color="#999999" text="" horizontalCenter="0" bottom="10" visible="false" maxWidth="290" />

    <mx:TabNavigator id="tabNavigator" width="100%" height="0%"  visible="false" creationPolicy="auto">


        <mx:VBox id="generalInformation" label="Gen. Info." width="100%">
            <mx:Label id="ard" text=""> 
            </mx:Label>
            <mx:Button  id="googleButton" visible="false" label="Google Directions" click="newWin('https://maps.google.com/?q=' + addressResult)"/>
            <mx:Button id="mapquestButton" visible="false" label="MapQuest Directions" click="newWin('https://mapquest.com/?q=' + addressResult)"/>
        </mx:VBox>
        <mx:VBox id="schoolDistrict" label="School District" width="100%">
        </mx:VBox>
        <mx:VBox id="paHouse" label="PA House" width="100%">
        </mx:VBox>
        <mx:VBox id="paSenate" label="PA Senate" width="100%">
        </mx:VBox>
        <mx:VBox id="usHouse" label="US House" width="100%">
        </mx:VBox>
    </mx:TabNavigator>  
</mx:Panel>
4

1 回答 1

1

您的按钮设置为,visible="false"因此它们不会出现。

<mx:Button  id="googleButton" visible="false" label="Google Directions" click="newWin('https://maps.google.com/?q=' + addressResult)"/>
<mx:Button id="mapquestButton" visible="false" label="MapQuest Directions" click="newWin('https://mapquest.com/?q=' + addressResult)"/>
于 2012-08-22T18:18:19.030 回答