It was actualy working.  But, you couldn't see the scroll bars 
because the canvas had a minHeight and minWidth that placed the 
scrollbars out of view.  The sample code below is one way the you 
can get the desired results.  clipContent and scroll policies work 
together.  If the clipContent property is false, a container lets 
its child extend past its boundaries. Therefore, no scroll bars are 
necessary, and Flex never displays them, even if you set 
horizontalScrollPolicy and verticalScrollPolicy to on.

Hope that this helps,
-TH

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml";
xmlns="*"
layout="horizontal"
height="300" width="400"
verticalScrollPolicy="off"
horizontalScrollPolicy="off">

<mx:HDividedBox
height="100%" width="100%"
creationPolicy="all"
verticalScrollPolicy="off"
horizontalScrollPolicy="off">

<mx:Canvas id="LeftPanel" width="30%" height="100%" />

<mx:VBox id="propertySheetContainer"
width="70%" height="100%"
paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0">

<mx:Canvas id="PropertySheet"
height="100%" width="100%"
backgroundColor="#0000FF">

<mx:TextArea textAlign="right" backgroundColor="#0000FF" text="test 
text" x="10" y="10" height="430" width="530" />
</mx:Canvas>
</mx:VBox>
</mx:HDividedBox>
</mx:Application>



--- In [email protected], "thunderstumpgesatwork" 
<[EMAIL PROTECTED]> wrote:
>
> Tim,
> 
> Thanks for the suggestion. I have tried setting the scrollPolicy to
> OFF on all containers except the one I want to scroll, but it is 
still
> making the "propertySheetContainer" big enough to hold the property
> sheet instead of respecting the percentage size I set, and creating
> the scrollbar. (then you can't get to anything) It appears that 
sizing
> to fit children is of higher priority than percent sizes. I don't
> understand exactly what the 'clipContent' means when scrollPolicy 
is
> 'off' but I've tried it both ways (clip true and false) with the 
same
> results.
> 
> See sample code.
> Thanks,
> Thunder
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application 
>       xmlns:mx="http://www.adobe.com/2006/mxml"; 
>       xmlns="*" 
>       layout="horizontal" 
>       height="300" width="400"
>               verticalScrollPolicy="off"
>               horizontalScrollPolicy="off"
>               clipContent="false">
>       
>       <mx:HDividedBox 
>               height="100%" width="100%"
>               creationPolicy="all"
>               verticalScrollPolicy="off"
>               horizontalScrollPolicy="off"
>               clipContent="false">
>               
>               <mx:Canvas id="LeftPanel" width="30%" 
height="100%" />
>       
>               <mx:VBox id="propertySheetContainer" 
>                       width="70%" height="100%" 
>                       horizontalScrollPolicy="on" 
>                       verticalScrollPolicy="on" 
>                       clipContent="true">
>                               
>                       <mx:Canvas id="PropertySheet" 
>                               height="100%" width="100%"
>                               minHeight="450"
>                               minWidth="550">
>                               
>                               <mx:TextArea x="10" y="10" 
height="430" width="530" />
>                       </mx:Canvas>
>               </mx:VBox>
>       </mx:HDividedBox>
> </mx:Application>
> 
> 
> --- In [email protected], "Tim Hoff" <TimHoff@> wrote:
> >
> > This is something that we are all dealing with.  Unfortunatly, 
you 
> > have to explicitly set the scrollPolicy and clipContent 
properties 
> > for every container in the displayList; including application 
and 
> > canvas.  It would be nice if you could set a global 
> > verticalScrollPolicy and horizontalScrollPolicy to "off", and 
then 
> > just over-ride the policies to "auto" or "on" for the containers 
> > that you want to display scrollBars.  If you add scroll policies 
and 
> > clip content properties to the rest of your containers, you 
should 
> > be able to fix the problem.
> > 
> > -TH
> > 
> > --- In [email protected], "thunderstumpgesatwork" 
> > <thunder.stumpges@> wrote:
> > >
> > > Trying to control scrollbars is giving me a headache!
> > > 
> > > I want everything to be dynamic sizing, so in general I either 
use
> > > percentages for all my sizes, or layout constraints. In some 
cases
> > > though, a component just cannot get smaller than a certain 
size to
> > > look correct. This is when I set the minHeight and minWidth 
right?
> > > 
> > > I want it's immediate parent to create scrollbars if 
necessary, so 
> > I
> > > set it's container to scrollPolicy="auto", and for some reason 
it
> > > decides to create two scrollbars, on different parent 
containers..
> > > like it's "splitting the difference" or something... 
> > > 
> > > How do I force the parent container to respect it's percentage 
> > size,
> > > and do all of the scrolling within it? Something seems really 
> > wrong. 
> > > Below is a self-contained sample application demonstrating the
> > > problem. The property sheet has a minWidth and minHeight that 
> > cause it
> > > to need to scroll in the 'propertySheetContainer', however 
when you
> > > run the app, you get scrollbars both on the container AND on 
the
> > > application!
> > > 
> > > any support is appreciated.
> > > thanks,
> > > Thunder
> > > 
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application 
> > >   xmlns:mx="http://www.adobe.com/2006/mxml"; 
> > >   xmlns="*" 
> > >   layout="horizontal" 
> > >   height="300" width="400">
> > >   
> > >   <mx:HDividedBox 
> > >           height="100%" width="100%"
> > >           creationPolicy="all"
> > >           verticalScrollPolicy="off"
> > >           horizontalScrollPolicy="off">
> > >           
> > >           <mx:Canvas id="LeftPanel" width="30%" 
> > height="100%" />
> > >   
> > >           <mx:VBox id="propertySheetContainer" 
> > >                   width="70%" height="100%" 
> > >                   horizontalScrollPolicy="auto" 
> > >                   verticalScrollPolicy="auto" 
> > >                   clipContent="true">
> > >                           
> > >                   <mx:Canvas id="PropertySheet" 
> > >                           height="100%" width="100%"
> > >                           minHeight="450"
> > >                           minWidth="550">
> > >                           
> > >                           <mx:TextArea x="10" y="10"
> > >                             height="430" width="530" />
> > >                   </mx:Canvas>
> > >           </mx:VBox>
> > >   </mx:HDividedBox>
> > > </mx:Application>
> > >
> >
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to