[D2009] Merging menus in non-MDI application.

Giganews Newsgroups
Subject:[D2009] Merging menus in non-MDI application.
Posted by: Jörgen Hägglund (jorgenhagglu…@netscape.net)
Date:Tue, 31 Mar 2009

Hi all!
My application is creating a child form and docks it into a pagecontrol,
and manually merging menus, so far so good.
The problem is merging the menus of the two forms, both are TMainMenu.
Main form's menu is GroupIndex'ed like this:
  File (100)
    Open (110)
    Save (120)
    Exit (199)
  Options (200)
    Settings (210)

Child form's menu is:
  File (110)
    Disconnect (160)

My "dream" is to get it like this:
  File
    Open
    Save
    Disconnect
    Exit
(etc)

But... Nothing is ever easy, is it?
The whole File menu is replaced by the child's menu.
If I set the GroupIndex of the File menu in the child, I get two File menus.
What have I missed? I thought I read the help really thoroughly. <g>

Best regards,
/Jörgen

Replies