3 Replies Latest reply on Feb 20, 2011 11:50 PM by Flex harUI

    Why won't my scroller work in this popup window?

    JoshBeall Level 1

      Hi All,


      I've got the following component:



      <?xml version="1.0" encoding="utf-8"?>
      <s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009" 
                 xmlns:mx="library://ns.adobe.com/flex/mx" width="850" height="400"
                     import flashx.textLayout.conversion.TextConverter;
                     import mx.events.FlexEvent;
                     import mx.managers.PopUpManager;
                     import spark.utils.TextFlowUtil;
                     protected function creationCompleteHandler(event:FlexEvent):void
                          mainText.textFlow = TextConverter.importToFlow(html,TextConverter.TEXT_FIELD_HTML_FORMAT);
                     protected function closeButton_clickHandler(event:MouseEvent):void
                <fx:String id="html"><![CDATA[
      <p>A bunch of html here</p>     
           <s:Scroller id="scroller" width="100%" height="100%" hasFocusableChildren="true">
                          <s:VerticalLayout paddingBottom="20" paddingLeft="20" paddingRight="20" paddingTop="0" />
                     <s:RichEditableText editable="false" width="100%" height="100%" id="mainText" />
                     <s:HGroup horizontalAlign="right" width="100%">
                          <s:Button id="closeButton" click="closeButton_clickHandler(event)" label="Close" />     



      But the scroller isn't working.  I've tried getting rid of the height on the component (set to 400 in my example), making the height 100%, making the height 90%, getting rid of the height and using buttom/top values of 20.  Nothing works, the scroller is never available to scroll my content.


      What I really want is for the window to be about 90% the height of the browser viewport, and for scrollbars to only show if the viewport is visible.