El h101, h101 son Shapes...
Entonces quedaría así:
Código Delphi
[-]
procedure Tfentrada.Lh101Click(Sender: TObject);
var
habita:integer;
comp:TShape
lbl:TLabel;
nom:String;
begin
lbl := TLabel(Sender);
nom := copy(lbl.Name, 2, Length(lbl.Name));
comp := TShape(FindComponent(nom));
habita:= comp.Brush.Color;
if habita = clYellow then begin
habita:=clRed;
comp.Brush.color:=habita;
lbl.Font.Color:=clYellow
end
else
begin
habita:=clYellow;
lbl.Font.Color:=clBlack;
comp.Brush.color:=habita
end
end;
Te he puesto el código de memoria, pero debe funcionar, salvo que haya cometido algun error de sintaxis. Lo más importante es que lo entiendas.
Ahora puedes hacer que todos los labels apunten a este OnClick; Si pulsas sobre lh101 funcionará con esa label y con el shape h101, si pulsas lh102 y el shape h102, y así sucesivamente...
AÑADO: Una vez que funcione, faltarían las comprobaciones de posibles errores en el FindComponent, y el los CAST.
Un saludo.