Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: FMX tabs and focus control


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 0
Jako Grobler

Posts: 45
Registered: 6/26/15
FMX tabs and focus control  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 30, 2017 2:51 PM
1. Start a new Multi Device project.
2. Add a TTabControl and align with Client (TabControl1).
3. Add a TTabItem to TabControl1 (TabItem1).
4. Add a TMemo to TabItem1 and align with Client (Memo1).
5. Add a TTabItem to TabControl1 (TabItem2).
6. Add a TListBox to TabItem2 and align with Client (ListBox1).
7. Add a TListBoxHeader to ListBox1 (ListBoxHeader1).
8. Add a TEdit to ListBoxHeader1 and align with Client (Edit1).

How do I get Edit1 to auto focus when TabControl2 becomes active? Tried (but it does not work):

procedure TForm1.TabControl1Change(Sender: TObject);
begin
if TabControl1.ActiveTab = TabItem2 then
Edit1.SetFocus;
end;
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02