Ver Mensaje Individual
  #5  
Antiguo 17-11-2017
Milworm99 Milworm99 is offline
Miembro
NULL
 
Registrado: nov 2017
Posts: 31
Reputación: 0
Milworm99 Va por buen camino
Cita:
Empezado por duilioisola Ver Mensaje
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

Última edición por Milworm99 fecha: 17-11-2017 a las 15:38:36.
Responder Con Cita