procedure TForm1.TreeView1Click(Sender: TObject);
var
s: string;
p: TPoint;
begin
GetCursorPos(p);
p := TreeView1.ScreenToClient(p);
if htOnLabel in TreeView1.GetHitTestInfoAt(p.x, p.y)
then begin
s := TreeView1.GetNodeAt(p.x, p.y).Text;
showmessage(s); // z.B.:
end;
end;