Edit is called automatically when the user edits the text of a tree view node. The Item parameter is the record supplied by the Windows control that identifies the node that was edited and the new value of its text. Edit unpacks this information into the parameters of an OnEdited event handler, and allows the event handler to change the value of the node抯 text.
楼主,关于edit方法的说明,在delphi帮助和源码里都有说明的。
procedure TBtTreeView.Edit(const Item: TTVItem);
var
bEdit: Boolean;
begin
inherited Edit(Item);
bEdit := False;
if (DataSet.State in [TDataSetState.dsBrowse]) then
begin
bEdit := True;
DataSet.Edit;
end;
DataSet.FieldByName(DisplayField).AsString :=
StrUtils.IfThen(Item.pszText='', DataSet.FieldByName(DisplayField).AsString,
Item.pszText);
if bEdit then
DataSet.Post;
end;