// you’re reading...

Flex 2.0

Text area bound to slider value controlled by button

This is a simple thing I tried just to review. It's a text area that has it's text property bound to the slider's value property which is incremented by the button.

Here's the code

XML:
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml">
  3.     <mx:Panel title="My Application"  textAlign="center" horizontalAlign="center" buttonColor="#800000">
  4.         <mx:TextArea id="textarea1" text="{theSlider.value}" fontSize="12"/>
  5.         <mx:HSlider id="theSlider" minimum="0" maximum="20" allowTrackClick="true"/>
  6.        
  7.         <mx:Button label="Increase" click="theSlider.value++;" width="150" height="35"/>
  8.     </mx:Panel>
  9. </mx:Application>

Discussion

No comments for “Text area bound to slider value controlled by button”

Post a comment