开发者

When add a new folder in the tree view control in C#

I have Tree view 开发者_如何学JAVAcontrol in my project. And i want to add a folder, it is adding but problem is this it is not editable or not set the focus of cursor at the time of adding the folder because i want to rename my folder.

Plz reply soon........ Thanks in advance..........


I think u r need this...

Find Treeview Property LabelEdit and set 'True'

then by selecting any TreeNode just press F2 to edit TreeView Node Label.

when you set it 'True' use following code when you are adding node

TreeNode node1 = new TreeNode();            
treeView1.Nodes.Add(node1);            
treeView1.Nodes[node2.Index].BeginEdit();

dnt forget to vote me...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜