一个默认不出现滚动条的hack

在app里加入
           
private function preinit():void
            {
                UIComponent.mx_internal::dispatchEventHook=myHook;
            }

            private function myHook(e:Event, uic:UIComponent):void
            {
                if (e.type == "preinitialize")
                {
                    if (uic is Container)
                    {
                        Container(uic).horizontalScrollPolicy=ScrollPolicy.OFF;
                        Container(uic).verticalScrollPolicy=ScrollPolicy.OFF;
                    }
                }
            }

另外,在application标签里写preinitialize="preinit()"这个方法就可以啦~

转:http://www.riachina.com/showtopic-14053.aspx

你可能感兴趣的:(java)