【发布时间】:2012-07-11 09:46:44
【问题描述】:
如何让TreeView在展开节点时改变它的宽度,使节点的标签完全显示出来。
首先我设置DrawMode = OwnerDrawAll;
然后处理事件DrawNodeandin handler
e.DrawDefault = true;
currentWith_ = Math.Max(currentWith_, e.Node.Bounds.Right);
然后在AfterExpand 中设置控件。但不是每次都有效。有时 with 没有更改或更改不正确。
如何解决这个问题。 提前致谢。
【问题讨论】:
-
你试过什么?
标签: c# winforms user-interface treeview