FNC TreeView : read-only but editable node text?


I would like to allow the user to select the text in a treeview so he can copy it all or in part but prevent the text to be changed.

Is there a simple way to do this?


To enable read-only on editor level you can use the following code:

procedure TForm1.TMSFNCTreeView1CustomizeInplaceEditor(Sender: TObject;
  ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;
  AInplaceEditor: TControl);
  if AInplaceEditor is TCustomEdit then
    (AInplaceEditor as TCustomEdit).ReadOnly := True;

Works like a charm. Thank you