Arrange Child Windows in a MDI scenario

7 posts, 0 answers
  1. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 08 Apr 2011 Link to this post

    Hi!
     I have a MDI Ribbon Form. I'm not using ribon merge. My child form open to different sizes. Client requires a single click Cascade sort operatin on all open child windows. How do I go about achieving this and also, is there a way to have a DropDownList control in the Ribbon to drop-list all open child windows?

    Regards.
  2. sharon
    sharon avatar
    3 posts
    Member since:
    Mar 2016

    Posted 02 Mar Link to this post

    Is there an answer for this question?

    How do I arrange mdi forms in horizontal /vertical/ tile/ cascade? 

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 02 Mar Link to this post

    Hello Sharon,

    Thank you for writing.

    You can call the Form.LayoutMdi method and arrange the layout according to the MdiLayout enumeration. Please check my code snippet below: 
    public partial class RadForm1 : Telerik.WinControls.UI.RadForm
    {
        public RadForm1()
        {
            InitializeComponent();
     
            this.IsMdiContainer = true;
     
            RadForm form = new RadForm();
            form.Text = "MDI Child 1";
            form.MdiParent = this;
            form.Show();
     
            form = new RadForm();
            form.Text = "MDI Child 2";
            form.MdiParent = this;
            form.Show();
     
            form = new RadForm();
            form.Text = "MDI Child 3";
            form.MdiParent = this;
            form.Show();
        }
     
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);
     
            this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal);
        }
    }

    A similar topic has also been discussed in the following forum threads:
    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. sharon
    sharon avatar
    3 posts
    Member since:
    Mar 2016

    Posted 06 Mar in reply to Hristo Link to this post

    Thanks .

    I tried this code  and it did not work…
    The forms are not arranged according the mdiLayout enumeration.


  6. Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 07 Mar Link to this post

    Hi Sharon,

    Thank you for writing back.

    I am sending you attached a short video showing the result on my end. The LayoutMdi method is inherited in RadForm from the System.Windows.Forms namespace and it behaves the same if standard forms are used.

    In case you keep experiencing this issue please send me a code snippet showing your local set up and additional information as to what behavior you expect.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. sharon
    sharon avatar
    3 posts
    Member since:
    Mar 2016

    Posted 10 Mar in reply to Hristo Link to this post

    Thanks for your reply!
    Here are more details on my problem:
    I created new telerik project and copied  the code you posted at 2.3.16 – this did not work on my computer.
    I check the exe file on some more computers. surprisingly on some computers the exe worked as expected, and on some not.
    I took the code you posted, and change the telerik radForm to regular windows form - this worked also on my computer.
  8. Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 10 Mar Link to this post

    Hi Sharon,

    Thank you for writing back.

    I did not manage to reproduce the described behavior. Could you please open up a support ticket and send us a sample application with the code you are using and specify on what systems you can reproduce this behavior:
    • type of Windows 
    • .NET version

    Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WinForms is Visual Studio 2017 Ready