Set order to document windows

2 posts, 0 answers
  1. Pierre
    Pierre avatar
    212 posts
    Member since:
    Apr 2007

    Posted 09 Jul 2009 Link to this post

    Hi,
    When we add dynamically a new doc windows like this:
            Dim Doc As New DocumentWindow  
            Doc.Text = "test" 
            m_RadDockMain.AddDocument(Doc) 

    the doc always add himself at the left of the current document. It is possible to inverse that and add all new document to the right?

    thanks
  2. Georgi
    Admin
    Georgi avatar
    296 posts

    Posted 10 Jul 2009 Link to this post

    Hi Pierre,

    By default all document windows are added on the left (at position 0) much like in Visual Studio. You may easily add your own custom behavior by changing the index of the document. Something like this:

    private void radDock1_DockWindowAdded(object sender, DockWindowEventArgs e)  
    {  
        if (e.DockWindow is DocumentWindow)  
        {  
            DockTabStrip strip = e.DockWindow.DockTabStrip;  
            if (strip != null)  
            {  
                strip.Controls.SetChildIndex(e.DockWindow, strip.Controls.Count - 1);  
            }  
        }  


    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top