Jump to content

TabOrder


skafy

Recommended Posts

HI,

I'm having problems with tabOrders in my controls that i make on the fly. I create 10 UniEdit fields (panel1) and when I click on one field and press tab tab,order is cycled between already created buttons. I attach simple case.

I want that when I put cursor on field 1 and pressing tab the tab order is set as fields was created 1,2,3,4,5,...

 

Please help.

UniguiTabOrder.7z

Link to comment
Share on other sites

On 1/25/2019 at 1:58 PM, skafy said:

HI,

I'm having problems with tabOrders in my controls that i make on the fly. I create 10 UniEdit fields (panel1) and when I click on one field and press tab tab,order is cycled between already created buttons. I attach simple case.

I want that when I put cursor on field 1 and pressing tab the tab order is set as fields was created 1,2,3,4,5,...

 

Please help.

UniguiTabOrder.7z

Hello skafy,

In your sample, you are creating the controls in UniFormShow Event

procedure TMainForm.UniFormShow(Sender: TObject);
begin

...

but if you create the controls in UniFormCreate then tab works ok:

procedure TMainForm.UniFormCreate(Sender: TObject);
var
  I: Integer;
  Edit: TUniEdit;
begin
  for I := 0 to 10 do
  begin
    Edit := TUniEdit.Create(Self);
    edit.Parent:= panel1;
    edit.Align:= alTop;
    edit.FieldLabel:= I.ToString;
    edit.TabOrder:= I;
  end;
end;

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...