Cita:
Empezado por duilioisola
Yo lo haría de forma ligeramente diferente, para que fuera mas sencillo agregar un label nuevo.
Código:
procedure TForm2.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
// Tecla abajo
if (GetKeyState(VK_DOWN)<0) then
begin
// Si el ultimo laber no es verde muevo el color.
if Label3.Font.Color <> clLime then
begin
Label3.font.color := Label2.font.color;
Label2.font.color := Label1.font.color;
Label1.font.color := clYellow;
end
end;
end;
|
Muchas Gracias duilioisola
Pero quisiera saber si se puede regresar el color en forma desendente al precionar el boton flecha arriba (VK_UP)
Ejemplo los colores de los Labels quedan asi:
Label1//Color Amarillo
Label2 //Color Amarillo
Label3 // Color Verde
Presiono boton flecha arriba
Label1//Color Amarillo
Label2 //Color Verde
Label3 // Color Amarillo
Presiono otra ves flecha arriba
Label1//Color Verde
Label2 // Color Amarillo
Label3 // Color Amarillo
Y por cada cambio de color verde en el label, me salga un mensaje Ejemplo: Label2 Color verde, tecla arriba: Color Label1 verde
Y regrese como estaba