I have a form with a TabControlExt on it, with 2 tabs. The first tab has a TextBox on it. In Form.Load I try to set the focus to the TextBox and select its text:
I know there was a similar problem with the SelectedIndexChanged event that got fixed, but I need to do this in the form Load and it looks like whatever I do in form Load the focus always goes to the tab itself.
ADAdministrator Syncfusion Team October 21, 2002 06:08 AM
The problem with doing this in Form_Load is quite probably because the Control is not Visible, yet.
You could instead set the TabStop of the tab control to false, then after Form_Load the focus will be set on one of the children in the current tab page (based on TabOrder).
Will that work?
HVHugues ValoisOctober 21, 2002 10:08 AM
Thanks for your response.
Your suggestion does work, and I'll use that for now, but I'm concerned that I am preventing the user from using the keyboard to switch to other tabs.
ADAdministrator Syncfusion Team October 23, 2002 08:14 AM
Our tab control will still let the user to switch between tabs using Ctrl+Tab, etc. even when the focus is on one of the children within the tab (as long as the SwitchPagesForDialogKeys is set to true). Will that work for you?
HVHugues ValoisOctober 24, 2002 08:36 AM
Thanks, I didn't know about Ctrl-Tab, I'm happy with this solution now!