Last created windows is not aktiv

2 posts, 1 answers
  1. Ralf
    Ralf avatar
    6 posts
    Member since:
    May 2012

    Posted 09 Apr 2015 Link to this post

    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();
            }
        }
    }

  2. Answer
    Ralf
    Ralf avatar
    6 posts
    Member since:
    May 2012

    Posted 10 Apr 2015 in reply to Ralf Link to this post

    Solution found:

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

  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top