ZForge.Controls.TreeViewAdv.Tree.AutoRowHeightLayout.GetRowHeight C# (CSharp) Method

GetRowHeight() private method

private GetRowHeight ( int rowNo ) : int
rowNo int
return int
        private int GetRowHeight(int rowNo)
        {
            if (rowNo < _treeView.RowMap.Count)
            {
                TreeNodeAdv node = _treeView.RowMap[rowNo];
                if (node.Height == null)
                {
                    int res = 0;
                    _measureContext.Font = _treeView.Font;
                    foreach (NodeControl nc in _treeView.NodeControls)
                    {
                        int h = nc.GetActualSize(node, _measureContext).Height;
                        if (h > res)
                            res = h;
                    }
                    node.Height = res;
                }
                return node.Height.Value;
            }
            else
                return 0;
        }