evilmrsock
08-01-2007, 03:15 PM
Okay. First time cracking into Flex at all, playing with layout combinations and just taking things one step at a time.
I have several short lists of songs that are broken up by genre. There's mabe a maximum of 10 songs in each, and there's only 3-4 genres.
In order to save on screen retail space, and because I really dig the visual effect of it working, I have these lists in an acccordion - they're the only things in each canvas.
I only want one item of the accordion selected at a time. I understand accordions create and hide their child nodes as you swap panes - if you change panes, that list is gone to you for the time being, that's exactly how I want it to work.
The problem is, I don't know how to say "What is the data of the currently selected item of this accordion?" At the end of the day, there's only 1 slot on the database to hold the selected item in the accordion.
Accordion.selectedChild gives me access to the Canvas on that pane, but from there, I can't figure out how to access the List.
I'm looking for the ______ in
accordion.selectedChild.______.selectedItem.data
Any takers?
<mx:FormItem label="Level BGM">
<mx:Accordion id="level_bgm" resizeToContent="true" width = "160" height="150">
<mx:Canvas label="Character Themes" width="100%" height="100%">
<mx:List name="99" width="90%" color="blue"
dataProvider="{BGM_List.characterThemes.theme}"
change="this.selectedItem=List(event.target).selectedItem" />
</mx:Canvas>
<mx:Canvas label="Story Themes" width="100%" height="100%">
<mx:List width="90%" color="blue"
dataProvider="{BGM_List.storyThemes.theme}"
change="this.selectedItem=List(event.target).selectedItem"/>
</mx:Canvas>
<mx:Canvas label="Battle Themes" width="100%" height="100%">
<mx:List width="90%" color="blue"
dataProvider="{BGM_List.battleThemes.theme}"
change="this.selectedItem=List(event.target).selectedItem"/>
</mx:Canvas>
</mx:Accordion>
</mx:FormItem>
I have several short lists of songs that are broken up by genre. There's mabe a maximum of 10 songs in each, and there's only 3-4 genres.
In order to save on screen retail space, and because I really dig the visual effect of it working, I have these lists in an acccordion - they're the only things in each canvas.
I only want one item of the accordion selected at a time. I understand accordions create and hide their child nodes as you swap panes - if you change panes, that list is gone to you for the time being, that's exactly how I want it to work.
The problem is, I don't know how to say "What is the data of the currently selected item of this accordion?" At the end of the day, there's only 1 slot on the database to hold the selected item in the accordion.
Accordion.selectedChild gives me access to the Canvas on that pane, but from there, I can't figure out how to access the List.
I'm looking for the ______ in
accordion.selectedChild.______.selectedItem.data
Any takers?
<mx:FormItem label="Level BGM">
<mx:Accordion id="level_bgm" resizeToContent="true" width = "160" height="150">
<mx:Canvas label="Character Themes" width="100%" height="100%">
<mx:List name="99" width="90%" color="blue"
dataProvider="{BGM_List.characterThemes.theme}"
change="this.selectedItem=List(event.target).selectedItem" />
</mx:Canvas>
<mx:Canvas label="Story Themes" width="100%" height="100%">
<mx:List width="90%" color="blue"
dataProvider="{BGM_List.storyThemes.theme}"
change="this.selectedItem=List(event.target).selectedItem"/>
</mx:Canvas>
<mx:Canvas label="Battle Themes" width="100%" height="100%">
<mx:List width="90%" color="blue"
dataProvider="{BGM_List.battleThemes.theme}"
change="this.selectedItem=List(event.target).selectedItem"/>
</mx:Canvas>
</mx:Accordion>
</mx:FormItem>