i have a Tile with repeater inside.
inside the repeater - a button.
pretty simple.
with a slider i want to change the size (width/height) of the button.
i works great if i bind width/height to slider value.
but how i do it the other way? from the slider to the button?
what should come inside the changeSize function?
here is a basic code:
<?xml version="1.0"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
[Bindable]
private var dp:Array = [132456789, 2, 3, 4, 5, 6, 7, 8, 9];
private function changeSize():void{
//what should be here?
}
]]>
</mx:Script>
<mx:Panel title="Repeater Resize" width="75%" height="75%"
paddingTop="10" paddingLeft="10" paddingRight="10"
paddingBottom="10">
<mx:HSlider maximum="200" minimum="100" value="120" id="slider1"
change="changeSize()" liveDragging="true"/>
<mx:Tile direction="horizontal" borderStyle="inset"
horizontalGap="10" verticalGap="15" width="100%"
paddingLeft="10" paddingTop="10" paddingBottom="10"
paddingRight="10">
<mx:Repeater id="rp" dataProvider="{dp}">
<mx:Button height="50" width="50"
label="{String(rp.currentItem)}"/>
</mx:Repeater>
</mx:Tile>
</mx:Panel>
</mx:Application>
__._,_.___
--
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
Software development tool Software development Software development services Home design software Software development company
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
Reply via email to
You could try binding the button's width and height to the slider's value using the following:
<mx:Button height="{outerDocument.slider1.value}" width="{SAME_AS_HEIGHT}" label="{String(rp.currentItem)}"/>
I think that'll work.
On 10/26/06, shemeshkale <[EMAIL PROTECTED]> wrote:

