title: TreeView label editing question
body: <p>I have a treeview with nodes like this: "Foo (1234)", and want to allow the user to rename the nodes, but only the Foo part, without (1234). I first tried to change the node text in <code>BeforeLabelEdit</code> like this:</p>
  
  <pre><code>private void treeView1_BeforeLabelEdit(object sender, NodeLabelEditEventArgs e)
  {
      e.Node.Text = "Foo";
  }
  </code></pre>
  
  <p>But when I click the node to edit it, "Foo (1234)" appears in the textbox.</p>
  
  <p>Okay, then let's try something else.</p>
  
  <p>I set <code>treeView1.LabelEdit</code> to false, and then do the following:</p>
  
  <pre><code>private void treeView1_MouseClick(object sender, MouseEventArgs e)
  {
      if (e.Button == MouseButtons.Left)
      {
          if (treeView1.SelectedNode == treeView1.GetNodeAt(e.Location))
          {
              treeView1.SelectedNode.Text = "Foo";
              treeView1.LabelEdit = true;
              treeView1.SelectedNode.BeginEdit();
          }
      }
  }
  </code></pre>
  
  <p>And then in <code>AfterLabelEdit</code>, I set <code>LabelEdit</code> back to false.</p>
  
  <p>And guess what? This doesn't work either. It changes the node text to "Foo" but the edit textbox does not appear.</p>
  
  <p>Any ideas?
  Thanks</p>