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

Set order to document windows

1 Answer 141 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 2
Iron
Iron
Pierre asked on 09 Jul 2009, 06:40 PM
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

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 10 Jul 2009, 01:47 PM
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.
Tags
Dock
Asked by
Pierre
Top achievements
Rank 2
Iron
Iron
Answers by
Georgi
Telerik team
Share this question
or