setFocus in TabControl with many rows

vman21

Registered User.
Local time
Today, 07:40
Joined
Feb 25, 2014
Messages
18
Greetings.

I have a form with a tabControl that contains many textboxes (about 80-100). Whenever the tab page is selected/activated the focus goes to somehwere down below.

I want to be able to set focus on the very top/first textbox so I tried txtBox1.setFocus on TabControl change event. However, there's a 2-3 seconds flickering that twitches my eyes (which is annoying) because a predefined setfocus was set in one of the textboxes at the very bottom.. but then it also focuses back on the txtBox1.

Is there somewhere in the properties that I need to correct in order to avoid this auto focus when a tabPage is activated? Possibly textbox tab Index?
 
Perhaps you just need to set the Tab Index property of each text box, starting with 0 for the first and 1 for second etc.
 
Perhaps you just need to set the Tab Index property of each text box, starting with 0 for the first and 1 for second etc.

I realised the tab indexes were already in chronological order in each tabs. However, I figured out a way to fix this by creating a subform and set the Source Object as the problem form.
 

Users who are viewing this thread

Back
Top Bottom