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

MDI Child Form - Reposition controls with menu merge

1 Answer 103 Views
Form
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 01 Mar 2017, 11:12 PM

I'm using RadForms for this project and the MDI Child form has only a RadMenu and a RadPageView on it.  When the menu is merged with the parent form's menu I would like to set the pageview's dock property to fill.  When the menu is not merged with the parent form's menu I would like to set the pageview's dock property to none.  The idea is that the pageview will occupy the entire (child) form when the menu is not present but will return to the location where it leaves space for the menu when the menu is present.

I haven't found the solution for determining when the menu is "on" the child form.  Is there one?

Thank you,

Gary

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 02 Mar 2017, 12:09 PM
Hi Gary,

Thank you for writing.

I am not exactly sure about your actual setup. In case you are maximizing the child forms within the MDI container, the child menus will be merged automatically. Since there is no menu merging event you need track changes in the WindowState of your child form and when you need to change the Dock property of the page view.

From your other ticket, however, I am assuming that you might be willing to have the child windows in a Normal state and yet merge their menus to the menu of the parent form. This can be accomplished by using the MergeMenu method of the RadMenu control. If that is the case you can dock the page view whenever you merge the menus and undock when you unmerge them.

I am attaching my sample project in which I tested the described behavior. I hope that a similar approach would also fit your local setup.

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

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Form
Asked by
Jay
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or