判断Node.Level的值,如果>=0则表示点击在Node上。如果判断onClick,则使用以下形式:if Treeview.Selected.Level>=0 then 
begin
  //do anything...
  ...
end;