procedure TForm1.TreeView1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
ClickInfo:THitTests;
begin
ClickInfo:=TreeView1.GetHitTestInfoAt(X,Y);
if htOnItem in ClickInfo then
ShowMessage('你刚才点了节点'+TreeView1.GetNodeAt(X,Y).Text)
else if htOnButton in ClickInfo then
ShowMessage('你刚才点了Button');
{else ...}
end;