Phillip Pearson - web + electronics notes

tech notes and web hackery from a new zealander who was vaguely useful on the web back in 2002 (see: python community server, the blogging ecosystem, the new zealand coffee review, 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: []