views:

909

answers:

4

Hi, I am trying to make a form in which the user fills in values. It is quite long. I wish to use an expandable tree to fit it into my one form. Is there any way to give each TreeView Node a TextBox by its side? Having the node text edited by itself is not enough.

+1  A: 

You can create the textBox in the TreeNode.Tag and then draw the textbox based on the actual TreeNode position.

Gonzalo Quero
+2  A: 

Is the textbox for editing the node? or for secondary data? If the node, it can already be editable (Edit/BeginEdit or something). If secondary data, I would be quite tempted to push this into a single textbox that displays/edits the data for the current selected node. That may text-boxes is going to be confusing!

Alternatively, there are some treeview/grid combined controls available from 3rd parties. Might be a good fit. Here's (look for TreeListView) a quick search hit (not a specific recommendation - just a search result).

Marc Gravell
A: 

Don't use useless 3rd party controls, as they are native in Windows ! (in particular the TreeListView, which is native since NT 3.5)

A: 

You can try the IntegralUI TreeView control from Lidor Systems. In every tree node, a custom control can be inserted. There is no limit on included controls.

Lokey