How to allow TreeView to change width when expanding the node so that the node label is fully displayed.
First I set DrawMode = OwnerDrawAll;
Then handle the DrawNode event and the handler
e.DrawDefault = true; currentWith_ = Math.Max(currentWith_, e.Node.Bounds.Right);
and then in AfterExpand installs the control with. But this does not work every time. Sometimes c does not change or changes incorrectly.
How to fix this problem. Thanks in advance.
source share