Question

I am working with Flex 3.0. I am trying to nest VBoxes within a TabNavigator and that works fine. But in my first VBox I have two buttons which won't show. I am not great with design concepts anyway and am new to Flex. I have tried messing with width and height properties, using an Hbox. Could someone take a look and figure out what I could do to fix these. Here is the full Panel. The TabNavigator is close to the bottom.

<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>
Was it helpful?

Solution

Your buttons are set to visible="false" so they are not going to show up.

<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)"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top