Set order to document windows

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

    Posted 09 Jul 2009 Link to this post

    When we add dynamically a new doc windows like this:
            Dim Doc As New DocumentWindow  
            Doc.Text = "test" 

    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?

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