How can you find out if a Flex Component (in my case the tree) is scrollable? I tried it like this
if (_listOwner.height < _listOwner.measuredHeight) {
// so stu开发者_StackOverflow社区ff
}
from within the tree's item renderer but didn't succeed. Access to the tree's scrollbar is private so that I can't get the info that way.
Found a solution by extending the tree class:
public class ExtendedTree extends Tree
{
public function ExtendedTree()
{
super();
}
public function get isVerticalScrollable():Boolean
{
if (super.verticalScrollBar == null || super.verticalScrollBar.visible == false)
return false;
return true;
}
}
Use the maxVerticalScrollPosition and maxHorizontalScrollPosition properties.
精彩评论