I got the way. thanks
On Aug 1, 11:27 am, "v...@t" <[email protected]> wrote:
> Hello Akhil
>
> As i have understand your problem u need that HDividedBox should not
> drag on some condition.
>
> Here i have set minWidth of the box so HDividedBox not drag
> when box width become minWidth.
>
> may help you, check below i have made some change on your code.
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> layout="absolute"
> creationComplete="onCreationComplete(event)">
>
> <mx:Script>
> <![CDATA[
> import mx.events.FlexEvent;
> [Bindable] private var minWidthBox : Number;
> private function
> onCreationComplete(event:FlexEvent):void
> {
> minWidthBox = h1.width*0.4; // set min width
> you want for box
> // it set 40% of HDividedBox width
> }
> ]]>
> </mx:Script>
>
> <mx:HDividedBox id="h1" x="20" y="124" height="90%" width="90%"
> visible="true" >
> <mx:VBox id="v1" backgroundColor="haloGreen" width="100%"
> height="100%">
> <!-- children -->
> </mx:VBox>
> <mx:VBox minWidth="{minWidthBox}" id="v2"
> backgroundColor="haloBlue" width="100%" height="100%">
> <!-- children -->
> </mx:VBox>
> </mx:HDividedBox>
>
> </mx:Application>
>
> With Regards
> Virat Patel
>
> On Jul 31, 7:51 pm, Akhil Agrawal <[email protected]> wrote:
>
> > Hi all,
> > I have this code
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> > layout="absolute">
> > <mx:Script>
> > <![CDATA[
> > import mx.controls.Alert;
> > private function ff():void{
> > if(h1.getDividerAt(0).x>250)
> > v2.x=250;
> > // h1.getDividerAt(0).x=250;
> > // if(h1.getChildAt(0).x>250)
> > // h1.moveDivider(0,250);
> > }
>
> > ]]>
> > </mx:Script>
>
> > <mx:Button id="b1" click="ff()">
>
> > </mx:Button>
> > <mx:HDividedBox id="h1" x="20" y="124" height="90%" width="90%"
> > visible="true" dragComplete="ff()" dividerDrag="ff()" >
> > <mx:VBox id="v1" backgroundColor="haloGreen" width="100%"
> > height="100%">
> > <!-- children -->
> > </mx:VBox>
> > <mx:VBox id="v2" backgroundColor="haloBlue" width="100%"
> > height="100%">
> > <!-- children -->
> > </mx:VBox>
>
> > </mx:HDividedBox>
>
> > </mx:Application>
>
> > I want that when user drag the divider he can drag it to a specified
> > limit(say x=250) after that he can't drop forward bt can move
> > backward. How to do this so that both colored box also displayed with
> > correct width
>
> > thanks
> > akhil agrawal
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---