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. Image for the cookie policy date
close icon

Programatically set focus to a docked control

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

2 Replies

PS Prakash S Syncfusion Team 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.


MM Mike Marshall 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. >

Loader.
Live Chat Icon For mobile
Up arrow icon