This content has been marked as final. Show 4 replies
TextArea is derived from ScrollControlBase which has a protected method scrollAreaChanged that you can override to know this.
An easier way would be look for verticalScrollBar and horizontalScrollBar properties. These properties return null if scroll bar is not showing.
Thanks a lot for your help. I definitely need this for my project! :)
I have used the height and the textHeight properties of the TextArea object to see if a bar is present.
if textArea.textHeight > textArea.height -- the scroll bar is present.
I have not been able to ever get a reference to the verticalScrollBar of the ScrollControlBase object to check for its presence.
I should have mentioned that both verticalScrollBar and horizontalScrollBar are protected properties not public! So you'll need to subclass TextArea to expose properties like verticalScrollBarShowing that would simple return true when verticalScrollBar != null.