This is a migrated thread and some comments may be shown as answers.

Add DocumentWindow to RadDock without activation

3 Answers 109 Views
Dock
This is a migrated thread and some comments may be shown as answers.
stefano
Top achievements
Rank 1
stefano asked on 22 May 2012, 11:31 AM
Hi,
I need to add a DocumentWindow to a RadDock control leaving the focus on my current focused control.
In other words I don't want the added DocumentWindow activates itself e get focus, i.e. the open link in new tab
in Internet Explorer.

How can I achieve it?
Thanks

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 22 May 2012, 04:50 PM
Hi Stefano,

In order to prevent the current DocumentWindow from being changed, you should handle the ActiveWindowChanging event and set its Cancel property to true. You may need to define a custom boolean flag which will determine the value of the Cancel property and set\reset the flag depending on your specific use cases.

I hope this helps.

Greetings,
Nikolay
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Mark
Top achievements
Rank 1
answered on 15 Apr 2013, 11:35 PM
Hi Nikolay 

Are you sure that works? I am also trying to open a tab without changing focus and I have done what you suggested but it still changes the focus.

I even set the cancel event to simply be True just to rule out any logic problems as you can see here:

Private Sub RadDock1_ActiveWindowChanging(sender As System.Object, e As Telerik.WinControls.UI.Docking.DockWindowCancelEventArgs) Handles RadDock1.ActiveWindowChanging
  e.Cancel = True
End Sub

The code that creates the form looks like this:
Dim form As New LogMeInBrowser()
form.Text = PageName
form.Name = PageName & "Servoyant"
form.MdiParent = Form1
form.Show()

Any ideas?
Thanks
Mark Donne
0
Nikolay
Telerik team
answered on 18 Apr 2013, 02:32 PM
Hello Mark,

It seems that there is an issue with this functionality. We will address it in one of our next releases. I am not able to provide you with a workaround due to the nature of the issue.

Your Telerik points have been updated.

Kind regards,
Nikolay
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Tags
Dock
Asked by
stefano
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Mark
Top achievements
Rank 1
Share this question
or