0

如何确定 Flex 组件(在我的例子中是树)是否可滚动?我试过这样

if (_listOwner.height < _listOwner.measuredHeight) {
  // so stuff
}

从树的项目渲染器中,但没有成功。对树的滚动条的访问是私有的,因此我无法以这种方式获取信息。

4

2 回答 2

0

通过扩展树类找到了解决方案:

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;
    }
}
于 2010-01-25T15:01:18.253 回答
0

使用 maxVerticalScrollPosition 和 maxHorizo​​ntalScrollPosition 属性。

于 2010-01-25T15:02:37.367 回答