Quantcast
Channel: Flex Monkey Patches » Flex
Viewing all articles
Browse latest Browse all 10

Note to self #3: Simple Flex 4 state toggling

0
0

I was looking for a quick and simple UI device to tie to my application state (or current component) in Flex 4 so that I could easily change states. I was just building a prototype app, so no need to be fancy. Here is a simple mx:togglebuttonbar solution:

  1.  
  2.  
  3. <s:states>
  4.     <s:State name="default"/>
  5.     <s:State name="admin"/>
  6. </s:states>
  7.  
  8. <mx:ToggleButtonBar dataProvider="{this.states}"
  9.     itemClick="this.currentState=event.label" labelField="name"/>
  10.  
  11.  

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images