如何知道 Treeview,的节点是根节点
![](https://images0.cnblogs.com/blog/300447/201408/011039245089276.png)
procedure
TForm1.TreeView1ContextPopup(Sender: TObject; MousePos:
TPoint;
var Handled:
Boolean);
begin
if TreeView1.Selected.IsFirstNode then
mni_delete.Enabled:=false
else
mni_delete.Enabled:=True;
end;