We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TabControlExt and child control focus in form load

Thread ID:

Created:

Updated:

Platform:

Replies:

1337 Oct 18,2002 06:26 PM UTC Oct 24,2002 01:36 PM UTC WinForms 4
loading
Tags: Tools
Hugues Valois
Asked On October 18, 2002 06:26 PM UTC

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: textBox1.SelectAll(); textBox1.Focus(); 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. thanks, hugues

Administrator [Syncfusion]
Replied On October 21, 2002 11:08 AM UTC

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? -Praveen

Hugues Valois
Replied On October 21, 2002 03:08 PM UTC

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. hugues

Administrator [Syncfusion]
Replied On October 23, 2002 01:14 PM UTC

Hugues, 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? Regards, Praveen Ramesh

Hugues Valois
Replied On October 24, 2002 01:36 PM UTC

Thanks, I didn't know about Ctrl-Tab, I'm happy with this solution now!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;