MadamZuZu
05-07-2007, 07:57 PM
hi :)
i want to display a viewstack, depending on the list item chosen.
i played with it, but can't get it to work properly.
please helllllp
<mx:Model id="MyQuestions" >
<states>
<state label="asdfsadfsfd?" data="test test2" id="test"/>
<state label="fdghdgdasgf?" data="test asdfasdftest2" id="test2"/>
</states>
</mx:Model>
<mx:List id="QAList" width="100%" color="#004080"
dataProvider="{MyQuestions.state}"
change="this.selectedItem=List(event.target).selectedItem" click="myViewStack.selectedChild=[this is where i want to pass in the ID from my XMLList]" />
<mx:HBox >
<mx:Button id="searchButton" label="Search Panel"
click="myViewStack.selectedChild=search;"/>
<mx:Button id="cInfoButton" label="Customer Info Panel"
click="myViewStack.selectedChild=custInfo;"/>
<mx:Button id="aInfoButton" label="Account Panel"
click="myViewStack.selectedChild=accountInfo;"/>
</mx:HBox>
<mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="80%">
<mx:Canvas id="test" backgroundColor="#FFCCFF" label="Account sadfInfo" width="100%" height="100%">
<mx:Label text="Account asdfasd Info" color="#000000"/>
</mx:Canvas>
</mx:ViewStack>
....
or maybe you can suggest something else?
i could display it in regular text boxes, but the issue i'm having is that i can't put HTML tags in the XMLList... and i need my text formatted.
Thanks!
i want to display a viewstack, depending on the list item chosen.
i played with it, but can't get it to work properly.
please helllllp
<mx:Model id="MyQuestions" >
<states>
<state label="asdfsadfsfd?" data="test test2" id="test"/>
<state label="fdghdgdasgf?" data="test asdfasdftest2" id="test2"/>
</states>
</mx:Model>
<mx:List id="QAList" width="100%" color="#004080"
dataProvider="{MyQuestions.state}"
change="this.selectedItem=List(event.target).selectedItem" click="myViewStack.selectedChild=[this is where i want to pass in the ID from my XMLList]" />
<mx:HBox >
<mx:Button id="searchButton" label="Search Panel"
click="myViewStack.selectedChild=search;"/>
<mx:Button id="cInfoButton" label="Customer Info Panel"
click="myViewStack.selectedChild=custInfo;"/>
<mx:Button id="aInfoButton" label="Account Panel"
click="myViewStack.selectedChild=accountInfo;"/>
</mx:HBox>
<mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="80%">
<mx:Canvas id="test" backgroundColor="#FFCCFF" label="Account sadfInfo" width="100%" height="100%">
<mx:Label text="Account asdfasd Info" color="#000000"/>
</mx:Canvas>
</mx:ViewStack>
....
or maybe you can suggest something else?
i could display it in regular text boxes, but the issue i'm having is that i can't put HTML tags in the XMLList... and i need my text formatted.
Thanks!