hi Jason

How can I keep this effect if i modify your example to become

<mx:HBox width="100%" height="100" backgroundColor="yellow">
     <mx:Button label="number1" width="75%"/>
     <mx:Canvas width="25%" horizontalScrollPolicy="off">
         <mx:Button width="100" label="number2"/>
     </mx:Canvas>
 </mx:HBox>

thanks
bod

--- In flexcoders@yahoogroups.com, "Jason Y. Kwong" <[EMAIL PROTECTED]> 
wrote:
>
> Have a nested container do the clipping for you. eg:
> 
> <mx:HBox width="300" height="100" backgroundColor="yellow">
>     <mx:Button label="number1" width="75%"/>
>     <mx:Canvas width="25%" horizontalScrollPolicy="off">
>         <mx:Button width="100" label="number2"/>
>     </mx:Canvas>
> </mx:HBox>
> 
> 
> On 6/16/06, bhaq1972 <[EMAIL PROTECTED]> wrote:
> >
> > Mike and Tom thanks for the input.
> >
> > firstly, I tried using clipContent before but doesn't work.
> >
> > if i was dealing with fixed widths and set the
> > horizonatalScrollPolicy 'off', i can achieve the effect i was
> > looking for eg
> >
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
xmlns="*" >
> >         <mx:HBox width="300" height="100" 
backgroundColor="yellow"
> > horizontalScrollPolicy="off">
> >         <mx:Button label="number1" width="225"/>
> >         <mx:Button label="number2" width="85"/>
> >     </mx:HBox>
> > </mx:Application>
> >
> > But as i'm not dealing with fixed button widths, i had to think 
of
> > another way to get this effect....hence paddingRight=-15 and some
> > kind of contentClip.
> >
> > As i'm only dealing with layout, i would have thought something
> > would work out of the box. Adobe???
> >
> > I'm willing to try your suggestion of a mask, if you can gives 
us a
> > few ideas on how to do that thanks.
> >
> >
> > regrds
> > bod
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --- In flexcoders@yahoogroups.com, "Michael Schmalle"
> > <teoti.graphix@> wrote:
> > >
> > > > I don't think the layout algorithm  takes negetives into 
account.
> > >
> > > I didn't mean it doesn't use the negetive padding, just it 
doesn't
> > calculate
> > > the 'measured width' right when laying out the mask for the
> > container using
> > > a negetive padding with a percentage.
> > >
> > > Ah, to hard to explain right.
> > >
> > > Peace, Mike
> > >
> > > On 6/15/06, Michael Schmalle <teoti.graphix@> wrote:
> > > >
> > > > Hi,
> > > >
> > > > For you to understand the problem you need to understand how 
the
> > HBox lays
> > > > it's children out and uses viewMetrics.
> > > >
> > > > The reason this is not working is because since you specified
> > 75% width,
> > > > the container will calc the .75 of the width minus anything 
that
> > is static
> > > > IE your button 2.
> > > >
> > > > When you say paddingRight = -15, this kind defines the logic 
of
> > the
> > > > layout.
> > > >
> > > > For some reason, when you specify -15 for paddingLeft, the
> > content on both
> > > > sides then get clipped.
> > > >
> > > > I am not Adobe, but I would venture to guess this cannot be 
done
> > right
> > > > now. Not saying this is a bug but, I don't think the layout
> > algorithm  takes
> > > > negetives into account.
> > > >
> > > > You could always subclass HBox and create a mask over it and 
use
> > > > borderMetrics to size the mask.
> > > >
> > > > Peace, Mike
> > > >
> > > >
> > > >
> > > > On 6/15/06, Tom Chiverton <tom.chiverton@> wrote:
> > > > >
> > > > >    On Thursday 15 June 2006 12:09, bhaq1972 wrote:
> > > > > > how do i achieve this ?
> > > > >
> > > > > clipContent ?
> > > > >
> > > > > --
> > > > > Tom Chiverton
> > > > >
> > > > > ****************************************************
> > > > >
> > > > > This email is sent for and on behalf of Halliwells LLP.
> > > > >
> > > > > Halliwells LLP is a limited liability partnership 
registered
> > in England
> > > > > and Wales under registered number OC307980 whose registered
> > office address
> > > > > is at St James's Court Brown Street Manchester M2 2JF. A 
list
> > of members is
> > > > > available for inspection at the registered office. Any
> > reference to a
> > > > > partner in relation to Halliwells LLP means a member of
> > Halliwells LLP.
> > > > > Regulated by the Law Society.
> > > > >
> > > > > CONFIDENTIALITY
> > > > >
> > > > > This email is intended only for the use of the addressee 
named
> > above and
> > > > > may be confidential or legally privileged. If you are not 
the
> > addressee you
> > > > > must not read it and must not use any information 
contained in
> > nor copy it
> > > > > nor inform any person other than Halliwells LLP or the
> > addressee of its
> > > > > existence or contents. If you have received this email in
> > error please
> > > > > delete it and notify Halliwells LLP IT Department on 0870 
365
> > 8008.
> > > > >
> > > > > For more information about Halliwells LLP visit
> > www.halliwells.com.
> > > > >
> > > > > We are pleased to announce that Halliwells LLP has been 
voted
> > AIM Lawyer
> > > > > of the Year at the 2005 Growth Company Awards
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > What goes up, does come down.
> > > >
> > >
> > >
> > >
> > > --
> > > What goes up, does come down.
> > >
> >
> >
> >
> >
> >
> >
> >
> > --
> > 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
> >
> >
> >
> >
> >
> >
> >
> >
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/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