Du kannst das natürlich auch noch beliebig erweitern...
z.B:
1 > 2 > 3 > 4 > 1 > ...
Delphi-Quellcode:
VK_RIGHT:
if ActiveControl = RzBmpButton1 then ActiveControl := RzBmpButton2
else if ActiveControl = RzBmpButton2 then ActiveControl := RzBmpButton3
else if ActiveControl = RzBmpButton3 then ActiveControl := RzBmpButton4
else if ActiveControl = RzBmpButton4 then ActiveControl := RzBmpButton1;
1 > 2 > 1 > ...
und
3 > 4 > 3 > ...
Delphi-Quellcode:
VK_RIGHT:
if ActiveControl = RzBmpButton1 then ActiveControl := RzBmpButton2
else if ActiveControl = RzBmpButton2 then ActiveControl := RzBmpButton1
else if ActiveControl = RzBmpButton3 then ActiveControl := RzBmpButton4
else if ActiveControl = RzBmpButton4 then ActiveControl := RzBmpButton3;