Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I edit text in a TreeView list?

Status
Not open for further replies.

chrisG2

Programmer
Aug 3, 2007
5
AU
I want to be able to edit text in a TreeView list by double clicking the text which will make it editable.

I believe I'm need to use the TCustomTreeView::OnEdited event handler - I'm just not sure how to do this.

Could someone please post a simple example of an OnEdit event handler and how to link it in with the TreeView,

or an example of any other way to do this.

- thanks in advance
 
My understanding is that the OnEdited occurs after the treeview has been edited. To edit the treeview, you need to make certain that the ReadOnly property is set to false. Also look at the OnEditing event.

For more information you might want to look at these articles, too.



James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Thanks - too easy just use the OnEdited event handler from the Events palette in the object inspector
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top