skafy Posted January 25, 2019 Share Posted January 25, 2019 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 Quote Link to comment Share on other sites More sharing options...
skafy Posted January 29, 2019 Author Share Posted January 29, 2019 Anyone? Quote Link to comment Share on other sites More sharing options...
Pep Posted January 29, 2019 Share Posted January 29, 2019 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; 1 Quote Link to comment Share on other sites More sharing options...
skafy Posted January 29, 2019 Author Share Posted January 29, 2019 It works. Dunno how this did't came to mind. Thank you a lot Pep! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.