Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TMainMenu - MDIChild overwriting MDIForm



Permlink Replies: 2 - Last Post: Oct 28, 2016 10:00 AM Last Post By: Remy Lebeau (Te...
Toby Dobbs

Posts: 77
Registered: 9/24/16
TMainMenu - MDIChild overwriting MDIForm
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2016 7:19 AM
Hi,

I have a main form for a MDI application with a main menu. I also have several forms with individual menus which when loaded appear to overwrite that of the main application form. I would like to have one menu situated directly beneath the other - as a sub-menu that can be used in association with the main menu. What is the best way of acheiving this?

Regards,

Toby
Robert Triest

Posts: 687
Registered: 3/24/05
Re: TMainMenu - MDIChild overwriting MDIForm
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2016 8:03 AM   in response to: Toby Dobbs in response to: Toby Dobbs
I believe it's very difficult to let the menu behave like you want.
The MainMenu is a Windows API thing with it's own OS behavior.
Maybe you can use instead of a TMainmenu a TCool/TToolbar...
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: TMainMenu - MDIChild overwriting MDIForm
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2016 10:00 AM   in response to: Toby Dobbs in response to: Toby Dobbs
Toby wrote:

I have a main form for a MDI application with a main menu. I also
have several forms with individual menus which when loaded appear
to overwrite that of the main application form.

The MDI child form's menu does not overwrite the MDI parent form's menu.
It gets merged into the menu instead. As you switch between the child forms,
the parent's menu is updated accordingly. This is standard behavior for
MDI at the OS layer, not the VCL layer.

I would like to have one menu situated directly beneath the other

Sorry, TMainMenu does not work that way.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02