I have a rich text component with large amount of text. How to add vertical scrollbar to it?
I tried:
<mx:Canvas width="100%" height="100%" verticalScrollBar="vsb">
<s:RichText id="text" width="100%" height="100%" maxDisplayedLines="-1"/>
</mx:Canvas>
<s:VScrollBar id="vsb" height="100%"/>
But it get error: Initializer for ‘verticalScrollBar’: values of type mx.controls.scrollClasses.ScrollBar cannot be represented in text.
Reading the docs on RichText, I see this:
So, going with a RichEditableText (and setting its
editableproperty tofalse, this works for me with FlashBuilder 4.5. Note: I set the Scroller height to 200 and added lots of text to force a scrollbar to appear)