voici un petit bout de code pour résumer mon problème :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<mx:Application  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" >
  <mx:Script>
  	<![CDATA[
  		import mx.controls.Alert;
 		import mx.controls.Label;
 
 		public function  change():void
 		{
  				var l :Label = new Label();
  				l.text=" essai";
  				l.height=100;
  				box.addChild(l);
  		}
  	]]>
  </mx:Script>
	<mx:HBox top="0" width="100%" height="50" backgroundColor="yellow"/>
 	<mx:VBox id="box" height="100%" top="50" bottom="50"  width="100%" backgroundColor="white" verticalScrollPolicy="on" />
	<mx:HBox bottom="0" height="50" width="100%" backgroundColor="yellow">
		<mx:Button label="change" click="change()"/>
	</mx:HBox>
</mx:Application>
Je souhaite lorsque je clic sur le bouton change ajouter un label dans ma box qui est blanche. Ceci se déroule comme convenu. Mais lorsqu'il atteind le bas de ma box et que je continue a en rajouter il agrandit celle ci au lieu de me mettre un scroll bar.

Je ne vois pas comment faire pour que celle ci ne se redimensionne pas.

Avez vous une idée?