[FLASH & FLEX] problem pour cacher une balis

vince -  
 DLR -
Bonjour, je souhaite cacher une balise avec un contenu de type tableau de valeurs

je fais du mxml et Flash 9. pour moi la balise c'est par exemple:


<mx:DataGrid ......
</mx:DataGrid>


je vs montre un bout de mon code pour pouvoir expliquer ce que j'ai deja tente.


<mx:HBox width="100%" height="80%" 
		horizontalScrollPolicy="off" verticalScrollPolicy="off"
		borderStyle="none" borderColor="blue" id="hbox1"
		bottom="50" >
		
		<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
			xmlns:view="com.kamayo.karma.view.*"
			cornerRadius="10" borderStyle="none" 
			borderThickness="0" fontFamily="Arial" title="Catalogue" 
			fontSize="10" color="#275160" themeColor="#dcdadf" 
			enabled="true" bottom="0" width="{ModelLocator.CONTENT_WIDTH_LEFT - 100}"
			height="100%" id="leftPanel">

				<mx:Tree id="treeCatalogues" 
					width="{ModelLocator.CONTENT_WIDTH_LEFT/2}" height= "100%"
					dataProvider="{model.rootCatalogue}" 
					showRoot="false" labelField="name" click="doSelectCatalogueStruct()">
				</mx:Tree>
		</mx:Panel>
	
		<mx:TabNavigator id="tabNavigator" 
			width="{ModelLocator.CONTENT_WIDTH_RIGHT - 50 }" height= "100%"
			cornerRadius="10" paddingLeft="10" change="clickTab(event)">
			<mx:Canvas id="catalogueTab" label="{canvasName}" 
				width="100%" height="100%" 
				horizontalScrollPolicy="off" verticalScrollPolicy="off">
	 			
				<mx:HBox id="catalogueHBox" height="90%"   borderStyle="solid" borderColor="#ffffff">
					<mx:DataGrid id="dgCatalogue" width="250" height="100%"
						dataProvider ="{treeCatalogues.selectedItem.realCatalogues}"  
						labelField="{treeCatalogues.selectedItem.uiKey}"
						editable="false" click="selectCatalogue(event)">
						<mx:columns>
							<mx:DataGridColumn headerText="Version" dataField="{treeCatalogues.selectedItem.uiKey}"/>
						</mx:columns>
					</mx:DataGrid>
					
				 	<mx:VBox id="catalogueVBox" height="90%" horizontalScrollPolicy="off" verticalScrollPolicy="auto">

					<mx:DataGrid id="dgCatalogueVersion" width="250" height="100%"
						dataProvider ="{dgCatalogue.selectedItem.versions}"  
						labelField="{dgCatalogue.selectedItem.uiKey}"
						editable="false" click="selectCatalogue(event)">
						<mx:columns>
							<mx:DataGridColumn headerText="Version" dataField="name"/>
						</mx:columns>
					</mx:DataGrid>
 							
			 		 </mx:VBox>	
				</mx:HBox>
		 	</mx:Canvas>
		</mx:TabNavigator>
	</mx:HBox>


je veux faire disparaitre la DataGrid "dgCatalogueVersion"

Donc, pour cela, j'ai fait un

dgCatalogueVersion.visible=false


Cependant, mm si je le vois lpus, sa place est toujours occupé.

J'ai tenté ensuite d'utiliser la fonction
Citation:
removeChild
maus sans succès, j'ai toujours le même message que le parametre n'est pas un enfant, j'ai modifié plusieurs fois le parent mais ca me met toujours le même message comme par exemple :

tabNavigator.removeChild(dgCatalogueVersion) 
ou

hbox1.removeChild(dgCatalogueVersion)

etc...

Une idée?

merci d'avance
A voir également:

1 réponse

DLR
 
includeInLayout=false supprime la gestion de la place réservée, et visible=false le rend invisible
2