Ok, I think I got measuredHeight and height mixed up, measuredHeight IS always 
larger, so that if I change the code, it detects the need for scroll bars:

if (measuredHeight < height) verticalScrollPolicy = ScrollPolicy.ON;

However, it still just shows the ghost of a verticalScrollbar (while annoyingly 
showing an unnecessarily horizontal scrollbar!).  The vertical scroll isn't 
actually there, just the gutter for it!  What is going on?


--- In flexcoders@yahoogroups.com, "netdeep" <deep...@...> wrote:
>
> My application accepts input and adds charts to itself via addChild in 
> actionscript.  However, no matter how many charts I add, the app never shows 
> a vertical scrollbar until the user manually resizes the browser window.  How 
> do I fix this quirk?
> 
> I found this snippet on the web, but it doesn't work.  In fact, when the 
> Alert box pops up, measuredHeight is always less than height so the problem 
> seems to be that flex is not calculating the height correctly.  I tried 
> invalidateDisplayList() but that didn't work either.
> 
> override public function validateSize(recursive:Boolean = false):void {
>                               super.validateSize(recursive);
>                               if (!initialized) return;
>                               Alert.show("ht: "+height,"measured ht: 
> "+measuredHeight);
>                               if (height < measuredHeight) 
> verticalScrollPolicy = ScrollPolicy.ON;
>                               else verticalScrollPolicy = ScrollPolicy.OFF;
>                       }
>


Reply via email to