Forum Discussion

tim_faron's avatar
tim_faron
Contributor
9 years ago
Solved

mx.controls.VScrollBar Support for setting position

I am testing a Flex application and in my application is a VScrollBar [mx.controls::VScrollBar object],

 

I don't see an obvious method to set the scrollBar to a specific position or to Min/Max. Does such a method exist?

The properties I see which are somewhat useful, wMax, wMin, wPosition which all return a value.

 

I could write a custom method to keep clicking the up or down arrow but i was hoping to not have to do this.

 

Thanks,

  • HKosova's avatar
    HKosova
    9 years ago

    wPosition is a property, so it should be:

     

    scrollbarObj.wPosition = 165;

4 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi Tim,

     

    Use wPosition - it's read-write.

    • tim_faron's avatar
      tim_faron
      Contributor

      Thanks Helen,

      I tried this approach as I saw it mentioned previously, but for me it throws a runtime error.

       

      In my case the wMax is 165 so i do the following

      <someObject>.wPosition(165);

       

      What I get when I run this is a jScript runtime error. Object doesn't support this property or method

      Scroll.PNG

      • HKosova's avatar
        HKosova
        SmartBear Alumni (Retired)

        wPosition is a property, so it should be:

         

        scrollbarObj.wPosition = 165;