0 Replies Latest reply on Apr 7, 2009 1:56 PM by ahmed.malik

    Scroll Positions do not work if Scroll Policy is 'off'

    ahmed.malik

      I am using flex SDK 3.3.0.4852

       

      I have a canvas with

      canvas.horizontalScrollPolicy = "off";

      canvas.verticalScrollPolicy = "off";

       

      This canvas has an image in it, and I set the horizontal and vertical scroll positions programitically.

       

      canvas.horizontalScrollPosition = canvas.maxHorizontalScrollPosition;

      canvas.verticalScrollPosition = canvas.maxVerticalScrollPosition;

       

      then I save the scroll values in an xml file, and then on reopening of the xml file.. I do the following

      canvas.addEventListener("creationComplete", setScrollPositions);

       

      and in the method setScrollPositions(event) i do the following again

       

      canvas.horizontalScrollPosition = canvas.maxHorizontalScrollPosition;

      canvas.verticalScrollPosition = canvas.maxVerticalScrollPosition;

       

      But unfortunately it does not show any change in the scroll positions visually, and the default scroll positions persists. Though if i call an alert

       

      Alert.show(canvas.verticalScrollPosition.toString()); //it does show me some value, e.g. 56

       

      Now if i only set horizontal and vertical scrollPolicy = "on" ... all works fine. But the problem is that I want to hide my scrollbars and there is no other way I can do it. So please if there is any solution to it or if there is any workaround, do let me know. Thanks.