473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

TreeView - editing node labels

Sam
I'm having problem. I want to have a block of code run, after a user edits the label of a node, so I put the code in the event method of the afterLabelEdit event. The problem is that this code is called even before the label is finished being edited - its being called as soon as beginEdit is called. How can I have a block of code that is run only after the user finished editing?
Nov 16 '05 #1
1 3619
=?Utf-8?B?U2Ft?= <sh***********@corp.idt.net> wrote in
news:25**********************************@microsof t.com:
I'm having problem. I want to have a block of code run, after a user
edits the label of a node, so I put the code in the event method of the
afterLabelEdit event. The problem is that this code is called even
before the label is finished being edited - its being called as soon as
beginEdit is called. How can I have a block of code that is run only
after the user finished editing?


It's a pain. Best is to pop up a string input dialog which asks for
the new name and show that modal. You can then precisely say when the code
should run.

The reason it is a pain is because label editing is done by sending a
message to the underlying win32 treeview control. This isn't synchronized
very well with the synchronous behaviour of .NET.

FB

--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com
My .NET Blog: http://weblogs.asp.net/fbouma
Microsoft C# MVP
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ravi | last post by:
i tried with MS treeview control but i am unable to implement all the requirements.This requiement like when user login will generate the menu and display it. After that we need to Add or remove...
4
by: hzgt9b | last post by:
Using VS.NET 2003, VB: I have a TreeView object with lots of nodes. The treeview is docked on the left side of my main from in a splitter. I want to set the splitter's initial width to allow all...
0
by: Vladimir Scherbina | last post by:
Hello all. I am trying to edit label in TreeView node, and when I finished editing I need to get the new data, everythings is okay except that fact that I do not get a new data, that have been...
1
by: Anil | last post by:
I want to invoke LabelEdit event of TreeView/ListView(property set to true) from another event what should I do? The scenario is like windows explorer. If u click F2, selected node or item will be...
0
by: Sam | last post by:
I'm having problem. I want to have a block of code run, after a user edits the label of a node, so I put the code in the event method of the afterLabelEdit event. The problem is that this code is...
3
by: bob | last post by:
Hello, the nodes in my tree view show a name and then a suffix. I want to be able to edit the name using 'label edit' but I want the suffix to be removed and then added after the edit. I try...
3
by: vijaynats | last post by:
I have a treeview with a ContextMenu attached. When i click on a node, AfterSelect fires but does not fire when right clicked (the context menu pops up). (Background: I have loaded a list of...
0
by: Robin Tucker | last post by:
I have a tree view which I populate with the titles of nodes, which I then append the number of child nodes to. For example: +Root Of The Tree (2) +Next Level Of The Tree (1) Third Level (0)...
3
by: orit | last post by:
I have the following xml: <?xml version="1.0" ?> <course> <globalProperties> <externalMetadata> <source>ADL</source> <model>ADL SCORM 1.0</model> </externalMetadata> </globalProperties>
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.