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

Arrange Child Windows in a MDI scenario

10 Answers 729 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
DoomerDGR8 asked on 08 Apr 2011, 02:20 PM
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.

10 Answers, 1 is accepted

Sort by
0
sharon
Top achievements
Rank 1
answered on 02 Mar 2016, 07:08 AM

Is there an answer for this question?

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

0
Hristo
Telerik team
answered on 02 Mar 2016, 01:20 PM
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
0
sharon
Top achievements
Rank 1
answered on 06 Mar 2016, 07:10 AM

Thanks .

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


0
Hristo
Telerik team
answered on 07 Mar 2016, 11:42 AM
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
0
sharon
Top achievements
Rank 1
answered on 10 Mar 2016, 10:01 AM
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.
0
Hristo
Telerik team
answered on 10 Mar 2016, 01:14 PM
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.
0
Raj
Top achievements
Rank 1
answered on 28 Jan 2020, 11:52 AM

Hi

I have used the Form.LayoutMdi method.

this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal);

it is working fine for three forms. But when I used it for four forms. I got different layout.

e.g : I got the forms like this

1    2

3    4

excepted Result:

1

2

3

4

 

0
Nadya | Tech Support Engineer
Telerik team
answered on 29 Jan 2020, 07:08 AM

Hello Raj,

Following the provided information, I have tested the described scenario with the standard windows form and I observed the same behavior - the mdi child forms are not tiled horizontally when their count is bigger than three.

Since RadForm inherits from the System.Windows.Forms it is expected to behave in a similar way. I made some research in general programming forums. It seems that this issue regarding MdiLayout both TileHorizontal and TileVertical is already known. Please refer to the following threads which will be quite useful on this topic:
https://stackoverflow.com/questions/50691902/mdilayout-tilevertical-doesnt-work-correctly
https://stackoverflow.com/questions/53217815/how-can-i-control-the-display-order-of-child-forms-in-a-mdi-form 

Feel free to use the suggested solutions there.

I hope this information helps. Should you have any other questions do not hesitate to ask.

Regards,
Nadya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Raj
Top achievements
Rank 1
answered on 30 Jan 2020, 11:09 AM

Thanks for the reply.

Is there any another way to handle it.

0
Nadya | Tech Support Engineer
Telerik team
answered on 03 Feb 2020, 12:09 PM

Hello Raj,

Note that RadForm is not intended to handle this particular case in any specific manner. As I have already mentioned, RadForm inherits from the standard Windows Forms. This is why any working solution that is applicable to standard Windows Form is relevant to RadForm as well.

Note that this is more like a general programming question and it is not directly related to RadForm. Feel free to search in the relevant forums if you have any further questions on this topic.

Should you have further questions regarding RadControls from the Telerik UI for WinForms suite please let me know.

Regards,
Nadya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Carlos
Top achievements
Rank 1
commented on 30 Apr 2024, 03:48 PM

If you add a RadDock control to the code above (shared by Hristo) the layoutmdi doesn't work anymore...

How can I make it work MDI with tabs?  (same code above with raddock control) ?

 

Dinko | Tech Support Engineer
Telerik team
commented on 02 May 2024, 12:30 PM

You have posted the same question in different forum thread. Let's continue there to avoid duplication.

 

Tags
RibbonBar
Asked by
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
sharon
Top achievements
Rank 1
Hristo
Telerik team
Raj
Top achievements
Rank 1
Nadya | Tech Support Engineer
Telerik team
Share this question
or