Einzelnen Beitrag anzeigen

rayman

Registriert seit: 31. Jul 2003
Ort: Lohsdorf
40 Beiträge
 
Delphi 6 Enterprise
 
#6

Re: Navigation mit Pfeiltasten

  Alt 20. Sep 2006, 04:39
Das liegt bestimmt daran, dass du vor der Überprüfung schon das ActiveControl neu setzt. Wenn die erste Bedingung erfüllt ist, wird RzBmpButton2 aktiv, dadurch ist sofort die 2. Bedingung erfüllt.

mach es so
Delphi-Quellcode:
if (Key = VK_RIGHT) then if (Form1.ActiveControl = RzBmpButton1) and
  then Form1.ActiveControl := RzBmpButton2;
  else if (Form1.ActiveControl = RzBmpButton2) and (Key = VK_RIGHT)
    then Form1.ActiveControl := RzBmpButton3;
    else if (Form1.ActiveControl = RzBmpButton3) and (Key = VK_RIGHT)
      then Form1.ActiveControl := RzBmpButton4;
  Mit Zitat antworten Zitat