Avatar of Member_2_99151
Member_2_99151
 asked on

Multiple Main Menus in MDI Application

Hi,

It is possible to have a separate menu in a Child Window within an MDI application?

If you use the "MainMenu" component, it is not. Are there any components that allow this to happen???

Thanks,

James
Delphi

Avatar of undefined
Last Comment
Member_2_99151

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ferruccio Accalai

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Member_2_99151

ASKER
Thanks for the suggestion...
The GroupIndex looks pretty useful, but it is not quite what I am after.

I actually need a menu at the top of the child form as well as one for the parent.
I have looked at using other components, but none appear to dock at the top leaving the remainder of the form as the client area...

Any ideas?
Ferruccio Accalai

Have you tried what I've suggested?  It does exactly this!
Look at the screenshots attached
design.jpg
designmenu.jpg
runtime.jpg
Member_2_99151

ASKER
Hi,

I did try what you suggested but the menu still appeared on the MDI Parent. When one or more children were open, both sets of menus are merged into the main window.

The images you attached are exactly what I am after, so I am doing something wrong!

Are you able to attach the sample for the above for me to compare mine against?

Thanks
Your help has saved me hundreds of hours of internet surfing.
fblack61
Ferruccio Accalai

Of Course. It's a simple default Delphi MDI Application.
Wait a moment, I have to recreate it ;)
Ferruccio Accalai

Here it is
MDI.zip
Member_2_99151

ASKER
Thanks...

In the sample you have, it does display the menus in the Child ToolBar, but the 'File' menu still merges into the main window.

Is it possible to stop this from happenning?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Member_2_99151

ASKER
Actually, if you tell the parent window that there is no menu, but add a toolbar to it linked to MainMenu1 it works fine :-)
Member_2_99151

ASKER
Thanks for the help :-)