Re: Problem with tab order and group box



It works OK for me with D3, tabbing in order Edit2,
GroupBox1.ListBox1, GrouoBox1.Edit1, CheckBox1 with Enter, with
either ...

procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If (Key = VK_RETURN) then
SelectNext(ActiveControl, True, True);
end;

....or ...

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
If (Key = #13) then
SelectNext(ActiveControl, True, True);
end;

with ,,,

TForm1 = class(TForm)
Edit2: TEdit; // tab order 0
GroupBox1: TGroupBox; // tab order 1
ListBox1: TListBox; // tab order 0
Edit1: TEdit; // tab order 1
Edit3: TEdit; // tab order 2
CheckBox1: TCheckBox; // tab order 3

....and with the Form's KeyPreview set to true.

Alan Lloyd
.