Einzelnen Beitrag anzeigen

dm007

Registriert seit: 19. Sep 2006
17 Beiträge
 
#5

Re: Navigation mit Pfeiltasten

  Alt 20. Sep 2006, 04:19
Sorry, aber ich muss nochmal STÖREN!

Habe nur mit 2 Buttons getestet.

Ich verstehe nicht was DELPHI hier macht?

Delphi-Quellcode:
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin

   if (Form1.ActiveControl = RzBmpButton1) and (Key = VK_RIGHT) then Form1.ActiveControl := RzBmpButton2;
   if (Form1.ActiveControl = RzBmpButton2) and (Key = VK_RIGHT) then Form1.ActiveControl := RzBmpButton3;
   if (Form1.ActiveControl = RzBmpButton3) and (Key = VK_RIGHT) then Form1.ActiveControl := RzBmpButton4;
end;
Ich habe 4 Buttons und mit der RECHTS Taste möchte ich den Focus um 1 Button weiterschalten. Mit 2 Buttons funkt das auch.
Aber mit 4 Buttons, springt der von der 1 auf die 4 Hä, was mache ich FALSCH???

Gruß DM007
  Mit Zitat antworten Zitat