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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Programatically set focus to a docked control

Thread ID:

Created:

Updated:

Platform:

Replies:

924 Sep 3,2002 05:51 PM UTC Sep 4,2002 02:44 PM UTC Windows Forms 2
loading
Tags: Tools
Mike Marshall
Asked On September 3, 2002 05:51 PM UTC

Is there any way to set focus to a docked control? Working with the docking manager the best I can do is get a window docked at startup but I have to click on it manually to activate it. Thanks, Mike

Prakash S [Syncfusion]
Replied On September 4, 2002 02:15 PM UTC

Mike, If the control is already visible, then invoking the Control.Focus() method will activate the docking window and set focus to the control. On the other hand, if the form is just being loaded, then the default Windows Forms behavior will be followed and focus will be assigned to the docked control if it has the lowest TabIndex value on the form. Prakash Syncfusion, Inc.

Mike Marshall
Replied On September 4, 2002 02:44 PM UTC

Prakash, Thanks for the info. You were pretty much on target that the internals of the form loading logic was what was getting in the way. I've found that if you want a docked control to have focus on startup, the best way to do it reliably is the first time the Form's Acivated event is fired. Thanks again, Mike > Mike, > > If the control is already visible, then invoking the Control.Focus() method will activate the docking window and set focus to the control. On the other hand, if the form is just being loaded, then the default Windows Forms behavior will be followed and focus will be assigned to the docked control if it has the lowest TabIndex value on the form. > > Prakash > Syncfusion, Inc. >

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

;