Re: [flexcoders] States within List

2006-06-22 Thread Sreejith Unnikrishnan





Thanks Jason,

I think I am looking for a way to set the 
itemFocusIn and itemFocusOut to make stateChange on the 
VBox!

Sree


  - Original Message - 
  From: 
  Jason Szeto 

  To: flexcoders@yahoogroups.com 
  Sent: Thursday, June 22, 2006 1:01 
  AM
  Subject: RE: [flexcoders] States within 
  List
  
  
  
  
  Sree,
  
   
  You can create an ItemRenderer based on any UIComponent and add your states 
  into that. Then assign that ItemRenderer to your List. I have started working 
  on an example. This is not complete because it doesn’t handle selecting an 
  item. But it should be a good starting point. 
  
  DynamicListItemRenderer.mxml:
  
  ?xml 
  version="1.0" encoding="utf-8"?
  mx:VBox 
  xmlns:mx="http://www.adobe.com/2006/mxml" borderStyle="solid" 
  backgroundColor="0xFF" 
   
  verticalGap="-2" cornerRadius="4" 
  borderColor="0x00"
   
  rollOver="currentState='expanded'" 
  rollOut="currentState=''"
   
  
   
  
   
  mx:transitions
   
  mx:Transition fromState="*" toState="*"
   
  mx:Resize target="{this}" 
  duration="300"/ 
  
   
  /mx:Transition
   
  /mx:transitions
   
  
   
  mx:states
   
  mx:State name="expanded"
   
  mx:AddChild creationPolicy="all"
   
  mx:Label text="{data.desc}"/
   
  /mx:AddChild
   
  /mx:State
   
  /mx:states
   
  
   
  mx:Label text="{data.label}"/
   
  
  /mx:VBox
  
  
  Main.mxml:
  
  ?xml 
  version="1.0" encoding="utf-8"?
  mx:Application 
  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" width="600" height="500" 
  preinitialize="initList()"
   
  mx:Script
   
  ![CDATA[
   
  import mx.collections.ArrayCollection;
   
  
   
  [Bindable]
   
  public var 
  dataList:ArrayCollection; 
  
   
  
   
  public function initList():void
   
  {
   
  dataList = new ArrayCollection([{label:"One", desc:"The 
  US won the game on a last second 
  goal"},
   
  {label:"Two", desc:"The pressure was too much to 
  overcome"},
   
  {label:"Four", desc:"Look for exciting matchups"}]);
   
  }
   
  
   
  ]]
   
  /mx:Script
  
   
  mx:List id="mainList" itemRenderer="DynamicListItemRenderer" 
  variableRowHeight="true" 
   
  width="100%" height="300" 
  dataProvider="{dataList}"/
  /mx:Application
  
  
  
  
  
  From: 
  flexcoders@yahoogroups.com 
  [mailto:flexcoders@yahoogroups.com] On Behalf Of Sreejith 
  UnnikrishnanSent: Wednesday, 
  June 21, 2006 12:23 AMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] States within 
  List
  
  
  
  
  
  Is it possible to create states 
  within a List that changes height on select?
  
  
  
  Basically, I need to switch 
  between a simple and advanced view in a list only on 
  select.
  
  
  
  I tried using a Repeater in a 
  VBox, but navigating up and down using arrow keys is not possible(?) when 
  using a repeater.
  
  
  
  Any guidance is 
  appreciated.
  
  
  
  Thanks
  
  Sree
  
__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



[flexcoders] States within List

2006-06-21 Thread Sreejith Unnikrishnan





Is it possible to create states within a List that 
changes height on select?

Basically, I need to switch between a simple and 
advanced view in a list only on select.

I tried using a Repeater in a VBox, but navigating 
up and down using arrow keys is not possible(?) when using a 
repeater.

Any guidance is appreciated.

Thanks
Sree
__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



RE: [flexcoders] States within List

2006-06-21 Thread Jason Szeto










Sree,



 You can create an ItemRenderer
based on any UIComponent and add your states into that. Then assign that
ItemRenderer to your List. I have started working on an example. This is not
complete because it doesnt handle selecting an item. But it should be a
good starting point. 



DynamicListItemRenderer.mxml:



?xml version=1.0
encoding=utf-8?

mx:VBox
xmlns:mx=http://www.adobe.com/2006/mxml
borderStyle=solid backgroundColor=0xFF 

 verticalGap=-2
cornerRadius=4 borderColor=0x00

 rollOver=currentState='expanded'
rollOut=currentState=''

 

 

 mx:transitions

 mx:Transition
fromState=* toState=*

 mx:Resize
target={this} duration=300/ 

 /mx:Transition

 /mx:transitions

 

 mx:states

 mx:State
name=expanded

 mx:AddChild
creationPolicy=all

 mx:Label
text={data.desc}/

 /mx:AddChild

 /mx:State

 /mx:states

 

 mx:Label
text={data.label}/

 

/mx:VBox





Main.mxml:



?xml version=1.0
encoding=utf-8?

mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
width=600 height=500
preinitialize=initList()

 mx:Script

 ![CDATA[

 import
mx.collections.ArrayCollection;

 

 [Bindable]

 public
var dataList:ArrayCollection; 

 

 public
function initList():void

 {

 dataList
= new ArrayCollection([{label:One, desc:The US won the game
on a last second goal},

 {label:Two,
desc:The pressure was too much to overcome},

 {label:Four,
desc:Look for exciting matchups}]);

 }

 

 ]]

 /mx:Script



 mx:List
id=mainList itemRenderer=DynamicListItemRenderer
variableRowHeight=true 

 width=100%
height=300 dataProvider={dataList}/

/mx:Application











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sreejith Unnikrishnan
Sent: Wednesday, June 21, 2006
12:23 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] States
within List













Is it possible to create states within a List that changes
height on select?











Basically, I need to switch between a simple and advanced
view in a list only on select.











I tried using a Repeater in a VBox, but navigating up and
down using arrow keys is not possible(?) when using a repeater.











Any guidance is appreciated.











Thanks





Sree








__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___