Disabling scroller making the wrapped items not to work

20 views Asked by At

My requirement is to enable the scroller for an app if the height of the device is less than 1100. Here is the code for that..

 if( FlexGlobals.topLevelApplication.height < 1100)                  
                    settingsScroller.enabled=true;
                 else
                     settingsScroller.enabled=false;

But disabling the scroller disable all the items that were wrapped with it. Is there any solution for this.

Thank you in advance.

1

There are 1 answers

0
JK Patel On

I think, this will be helpfull to you

            if( FlexGlobals.topLevelApplication.height < 1100)
            {                  
                settingsScroller.setStyle('horizontalScrollPolicy', 'off');
                settingsScroller.setStyle('verticalScrollPolicy', 'off');
            }
            else
            {
                settingsScroller.setStyle('horizontalScrollPolicy', 'auto');
                settingsScroller.setStyle('verticalScrollPolicy', 'auto');
            }

hope this will works.