Results 1 to 3 of 3

Thread: quick treenode help

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283

    quick treenode help

    how do i call a function after a treenode has been edited? the node.AfterLabelEdit handle works, but it dosn't update the node.text property before the function executes, so i can't work with the changes the user made...

    also, is there a way to set a node as the selectednode when it is expanded. as it is, nodes can be expanded by clicking on the little plus sign and they expand, but they don't automaticaly get selected. if i could get the node that called the .afterexpandhandle, that would solve the problem....

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    I don't know about the first, but in the AfterExpand event you could try something like this : Treeview1.SelectedNode=e.Node

    That should do the trick
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780
    When the AfterLabelEdit event fires, you need to check the "e" object it passes back for the info. Just read "e.Label()" to get the new text the user has entered.

    You get all the info from the passed event arguments for all controls.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width