Add DocumentWindow to RadDock without activation

4 posts, 0 answers
  1. stefano
    stefano avatar
    6 posts
    Member since:
    Apr 2011

    Posted 22 May 2012 Link to this post

    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
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 22 May 2012 Link to this post

    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 >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mark
    Mark avatar
    2 posts
    Member since:
    Mar 2012

    Posted 15 Apr 2013 Link to this post

    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
  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 18 Apr 2013 Link to this post

    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.
Back to Top