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

DockingManager set active control without getting the focus

Hallo,
is it possible to show a docked control in the foreground without giving that control the focus?
We have a LoggingWindow that should be shown, if an error message is logged. At the moment we implemented this with the DockingManager.ActivateControl() method. The problem now is, that the focus is set to the LogWindow and the control that ownes the focus before looses it. So if a was editing a TextBox for example, the TextBox looses the focus and editing is not possible any more without clicking on the TextBox and set the focus on it before. So it would be nice, if I can "activate" a control without setting the focus on it. Could you please help me?

Thanks

Frederik


3 Replies

MJ Mano J Syncfusion Team March 13, 2009 02:39 PM UTC

Hi Frederik,

Did you try setting the focus to the textbox after activating the dock control?


this.dockingManager.ActivateControl(logPanel);
this.textBox.Focus();


This will transfer the focus back to the textbox.

Thanks,
Mano



AD Administrator Syncfusion Team March 13, 2009 10:05 PM UTC

Hy Mano,
thank you for your answer.
Yes I tried this way, but if I do so, the focus is already lost, so the editing mode of the textbox is left and events like "validating" are fired. I am searching a solution that doesn´t change the focus.

Regards

Frederik



AD Administrator Syncfusion Team March 18, 2009 11:46 AM UTC

Hi Frederik,

Thanks for the update.

Please refer the sample below in which I have set focus to the textbox in the panel using ActivateControl method. I was not able to see that the focus is lost.

http://files.syncfusion.com/support/Tools.Windows/7.1.0.30/F80086/Tools_WF_Docking_Focus.zip

Please provide me more details if I misunderstood this.

Regards,
Jaya



Loader.
Live Chat Icon For mobile
Up arrow icon