procedure TForm1.TreeView1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
Node: TTreeNode;
begin
if Button = mbRight then
begin
Node := TreeView1.GetNodeAt(X,Y);
if Node<>nil then
Node.Selected:=true
else
showmessage('Null');
end;
end;