如何知道
Treeview,的节点是根节点
![011039245089276.png](https://i-blog.csdnimg.cn/blog_migrate/40b729f051192ec56317c8dbb1e4102e.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;