Ver Mensaje Individual
  #4  
Antiguo 29-01-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Reputación: 26
seoane Va por buen camino
Cita:
Empezado por Angel Fernández
¿Cómo lo uso?
Pues haciendo un typecast como hiciste en el caso del Sender. Es decir:
Código Delphi [-]
  TPanel(TLabel(Sender).Parent).Color:= clRed;

Aunque no estaría mal, que hicieras un par de comprobaciones antes:
Código Delphi [-]
  if Sender is TLabel then
    if TLabel(Sender).Parent is TPanel then
      TPanel(TLabel(Sender).Parent).Color:= clRed;
Responder Con Cita