Hi d00mo,
I am very clear about your problem. If you only want to let the users can edit the label of the TreeNode, it is very easy to handle. We just need to set the LabelEdit to true. Then when users double click the TreeNode, the TreeNode label is editable.
If you do need to add control to TreeNode, I would suggest use one control for all the TreeNodes and place the control near to the current TreeNode. This is because if we have a lot of controls on one form, the performance will be very low. Here is a sample about adding a ComboBox to TreeView control.
If you want to change the position of the ComboBox, you can change the bounds of the ComboBox by changing the arguments of the SetBounds method.
Code Snippet
protected override void OnNodeMouseClick(TreeNodeMouseClickEventArgs e)
{
……�/span> this.m_CurrentNode.ComboBox.SetBounds(
this.m_CurrentNode.Bounds.X + this.m_CurrentNode.Bounds.Width + 3,
this.m_CurrentNode.Bounds.Y - 2,
this.m_CurrentNode.Bounds.Width + 25,
this.m_CurrentNode.Bounds.Height);
……�/span> }
Let me know if this helps, if not, could you please show us more information?
Best regards.
Rong-Chun Zhang
Windows Forms General FAQs
Windows Forms Data Controls and Databinding FAQs