private void RecalcOnCollapse(JetListViewColumn col, JetListViewColumn indentCol, int fixedWidth, JetListViewNode paramNode) { IEnumerator enumerator = paramNode.EnumerateChildrenRecursive(); while (enumerator.MoveNext()) { JetListViewNode node = (JetListViewNode)enumerator.Current; int desiredWidth = GetDesiredWidthIndented(col, indentCol, node, fixedWidth); if (col.Width == desiredWidth) { RecalcAll(col, indentCol, fixedWidth, null); break; } } }
private void RecalcOnExpand(JetListViewColumn col, JetListViewColumn indentCol, int fixedWidth, JetListViewNode paramNode) { int maxWidth = col.Width; IEnumerator enumerator = paramNode.EnumerateChildrenRecursive(); while (enumerator.MoveNext()) { JetListViewNode node = (JetListViewNode)enumerator.Current; int desiredWidth = GetDesiredWidthIndented(col, indentCol, node, fixedWidth); if (desiredWidth > maxWidth) { maxWidth = desiredWidth; } } col.Width = maxWidth; }