vb.net controls:
Ok, here is what I'm trying to accomplish. I have a treeview. Each node has 2 parts, a title and the data (i.e. "Author: Joe Smith" or "Editor: Jill Lane"). I need to let the user edit the "data" section of the nodes but not the "title" section. So instead of going the labelEdit route, I tried bringing up a textbox on MouseUp and doing the editing there. Here is where it gets tricky. I can get the textbox to go to the right spot, become visible get the data, all that easy stuff, and I can get it to hide again and save the data back to the node with textbox.Validated event. BUT I can't set focus on the textbox after making it visible (the treeview bug of take focus back AFTER the MouseUp event finishes). I found other topics discussing this, and the work around i found on groups was to set focus in Treeview.Mouseup then in textbox.GotFocus set focus again. The problem here is that with the textbox getting then losing then getting focus again, the validated event fires and hides the textbox again. What can I do? Any solution would be appreciated, even if the solution means doing something completely different, as long as the user can edit the data without being able to touch the title. If there is another way to accomplish seperating these sections apart in the treeview that I am unaware of, or different events to use to set the focus. Anything, I'm getting desperate. Thanks, Matt Booty
Don't see what you're looking for? Try a search.
|