Changing Flex3 ScrollBar maxScrollPosition at runtime
7 May 2008, 18:16, by JonA quick tip if you have a dynamic scroll bar and want to bind it’s maxScrollPosition to a value at runtime unfortunately you can’t use the MXML binding, i.e. maxScrollPosition={value}.
Alternatively you need to set the value programatically in an event handler, AND importantly call updateDisplayList() on the scrollbar. i.e.
<!--[CDATA[ private function handleSlideChange():void { scroll.maxScrollPosition = slider.value; scroll.invalidateDisplayList(); } ]]-->
7 comments below:
[...]
Pingback by Astuces Adobe Flex, Adobe Coldfusion, Papervision 3D | Matsiya — 9 May 2008 @ 07:00Great. It worked for me. Thanks for posting the solution.
Comment by Karthik — 15 August 2008 @ 20:09Great work. But somehow I am not being able to run this in my project. Can u gimme a detailed example? Or is it any FLEX SDK version specific? I have noticed that this bug is mentioned in Adobe’s site. Although they have said that this bug has been resolved in Flex 3.0.X version.
Best regards
Dipz
——————
http://www.webvariations.com
Excellent, was going nuts trying to figure this one out.
Comment by Matt Wilson — 26 December 2008 @ 17:41Thanks, was going nuts too. And would be nice if you fix this, Adobe ..
Comment by Marc Haemmerle — 12 March 2009 @ 10:12