title: How to calculate and change treeview width
body: <p>How to let the <code>TreeView</code> to change its width when expanding node so that the label of node will completely show.</p>
  
  <p>First I set the <code>DrawMode = OwnerDrawAll;</code></p>
  
  <p>Then handle the event <code>DrawNode</code> andin handler</p>
  
  <pre><code>e.DrawDefault = true;
  currentWith_ = Math.Max(currentWith_, e.Node.Bounds.Right);
  </code></pre>
  
  <p>and then in <code>AfterExpand</code> sets the control with. But is not works every time. Sometimes the with is not changed or changed not correctly.</p>
  
  <p>How to correct this problem.
  Thanks in advance.</p>