Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

How to fire Rename label in TreeView

Clicking on a Label in a TreeView will allow you to change the Label. Can this be done automatically?

for example, if i add a new node and say i gave it a temporary label; i want the user to change this temporary label. instead of the user having to click the node twice (to be able to edit), i want this done automatically. so all the user has to do is type in the new label.

thanks!
0
PePi
Asked:
PePi
1 Solution
 
samopalCommented:
Private Sub Command1_Click()
    Static i As Integer
    Dim nodX As Node
    i = i + 1
    Set nodX = TreeView1.Nodes.Add(, , "Nod" & i, "New Node")
    TreeView1.SetFocus
    nodX.Selected = True
    TreeView1.StartLabelEdit
End Sub

Hope This Helps,
D'Al
0
 
PePiAuthor Commented:
it helped a lot. thank you very much!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now