Not much dispatches a bubbling ADDED_TO_STAGE event IIRC :(
However, Container extends UIComponent, so you could use
UIComponent.mx_internal::dispatchEventHook. But make sure you chain (!!),
and you can't complain when Alex breaks your code in FX 4 :)
-Josh
On Tue, Sep 9, 2008 at 3:25 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
> How about (untested):
>
>
>
> systemManager.addEventListener(Event.ADDED_TO_STAGE, noscrollbarshandler,
> true);
>
>
>
> function noscrollbarshandler(event:Event):void
>
> {
>
> If (event.target is Container)
>
> {
>
> horizontalScrollPolicy =
> verticalScrollPolicy = "off";
>
> }
>
> }
>
>
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Doug McCune
> *Sent:* Monday, September 08, 2008 10:17 PM
> *To:* [email protected]
> *Subject:* Re: [flexcoders] Re: turn horizontalScrollPolicy and
> verticalScrollPolicy off for all
>
>
>
> Could you just use a global CSS stylsheet that set all the scrollbar
> skins to an empty skin (ProgrammaticSkin) by default, and then you
> would have to change the style specifically for any components you
> wanted to actually have scrollbars? Dunno if that would really work or
> not...
>
> Doug
>
> On Mon, Sep 8, 2008 at 9:07 PM, Brendan Meutzner <[EMAIL
> PROTECTED]<bmeutzner%40gmail.com>>
> wrote:
> > Agree here as well...
> >
> >
> > On Mon, Sep 8, 2008 at 9:47 PM, Tim Hoff <[EMAIL
> > PROTECTED]<TimHoff%40aol.com>>
> wrote:
> >>
> >> I agree, a lot of time can be wasted looking through nested
> >> containers trying to find a scrollbar culprit. wishlist?
> >>
> >> -TH
> >>
> >> --- In [email protected] <flexcoders%40yahoogroups.com>,
> "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
> >> >
> >> > I do understand. Maybe I should be more pro-active, but often my
> >> apps
> >> > reach a point where the best way to make sense of the scrollbar
> >> behavior
> >> > is to turn them off everywhere. I, too. would prefer the scroll
> >> > policies to be off by default.
> >> >
> >> >
> >> >
> >> > Tracy
> >> >
> >> >
> >> >
> >> > ________________________________
> >> >
> >> > From: [email protected] <flexcoders%40yahoogroups.com>
> >> [mailto:[email protected] <flexcoders%40yahoogroups.com>] On
> >> > Behalf Of Boon Chew
> >> > Sent: Monday, September 08, 2008 9:24 PM
> >> > To: [email protected] <flexcoders%40yahoogroups.com>
> >> > Subject: RE: [flexcoders] turn horizontalScrollPolicy and
> >> > verticalScrollPolicy off for all
> >> >
> >> >
> >> >
> >> >
> >> > It's kinda a pain to have to subclass every single container used
> >> in the
> >> > app just to turn the policy to off. I was hoping that for policy-
> >> based
> >> > stuff we have an app-wide setting, like
> >> > Application.application.scrollPolicy = "no" that can be overrided by
> >> > individual containers.
> >> >
> >> > Lazy programmers like me in this case will probably resort to monkey
> >> > patching the banana containers...
> >> >
> >> > - boon
> >> >
> >> > --- On Mon, 9/8/08, Gordon Smith <[EMAIL PROTECTED]> wrote:
> >> >
> >> > From: Gordon Smith <[EMAIL PROTECTED]>
> >> > Subject: RE: [flexcoders] turn horizontalScrollPolicy and
> >> > verticalScrollPolicy off for all
> >> > To: "[email protected] <flexcoders%40yahoogroups.com>" <
> [email protected] <flexcoders%40yahoogroups.com>>
> >> > Date: Monday, September 8, 2008, 5:35 PM
> >> >
> >> > Subclass the containers to set the policies to "off" and use the
> >> > subclasses instead.
> >> >
> >> >
> >> >
> >> > Gordon Smith
> >> >
> >> > Adobe Flex SDK Team
> >> >
> >> >
> >> >
> >> > From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups.
> >> com]
> >> > On Behalf Of Boon Chew
> >> > Sent: Monday, September 08, 2008 5:26 PM
> >> > To: flexcoders
> >> > Subject: [flexcoders] turn horizontalScrollPol icy and
> >> > verticalScrollPolic y off for all
> >> >
> >> >
> >> >
> >> > Hi,
> >> >
> >> > Is there a quick way to turn off horizontalScrollPol icy /
> >> > verticalScrollPolic y or prevent them from showing up once and for
> >> all
> >> > for all containers in an app without resorting to patching?
> >> >
> >> > - boon
> >> >
> >>
> >
> >
> >
> > --
> > Brendan Meutzner
> > http://www.meutzner.com/blog/
> >
>
>
>
--
"Therefore, send not to know For whom the bell tolls. It tolls for thee."
http://flex.joshmcdonald.info/
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]