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;