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

Last created windows is not aktiv

1 Answer 21 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Ralf
Top achievements
Rank 1
Ralf asked on 09 Apr 2015, 06:54 AM

Hello,

we have a problem with option AutoDetectMdiChildren. The last created windows is not the active window, but the first

We can not use the radDock.ActiveDocument property, because the forms are not a DockWindow, it's a normal System.Windows.Forms.Form.

It is posible to set the last window as aktive window?

namespace TelerikWinFormsApp1
{
    public partial class RadForm2 : Telerik.WinControls.UI.RadForm
    {
        public RadForm2()
        {
            InitializeComponent();
            this.IsMdiContainer = true;
            this.radDock1.AutoDetectMdiChildren = true;
 
            Form1 frm = new Form1(); // this frm is aktive
            frm.MdiParent = this;
            frm.Text = "Child 1";
            frm.Show();
            frm = new Form1();
            frm.MdiParent = this;
            frm.Text = "Child 2";
            frm.Show();
            frm = new Form1(); // this form should be active
            frm.MdiParent = this;
            frm.Text = "Child 3";
            frm.Show();
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Ralf
Top achievements
Rank 1
answered on 10 Apr 2015, 06:00 AM

Solution found:

private void RadForm2_Load(object sender, EventArgs e)
{
t     his.radDock1.ActivateMdiChild(frmToActivate);
}

Tags
Dock
Asked by
Ralf
Top achievements
Rank 1
Answers by
Ralf
Top achievements
Rank 1
Share this question
or