Phillip Pearson - Second p0st

tech notes and web hackery from the guy that brought you bzero, python community server, the blogging ecosystem, the new zealand coffee review and the internet topic exchange

2003-6-22

Delphi question (is there a TTreeView.BeginEdit?)

Can anyone tell me if there's a way to force editing a tree node in Delphi? I've got a TTreeView and I want to be able to add a new node and have it already selected for editing.

This will do the selection:

    node.MakeVisible;
    node.Selected := true;

... but how do I get it to start editing? In C# I can use TreeNode.BeginEdit and in wxWindows I can use wxTreeCtrl::EditLabel, but there doesn't seem to be a corresponding method in TTreeNode or TTreeView.

Update: Kev French answers this question in the comments. Node.EditText will do it. Thanks!
... more like this: []