Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By JohnH

Thread: Menu Merging MDI Winforms

  1. #1
    sputnik75043 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 3.5
    Join Date
    Aug 2010
    Posts
    13
    Reputation
    47

    Menu Merging MDI Winforms

    In my MDI form, I have a file menu, but it only has New/Preferences/Exit.
    I have 2 separate child forms that can be opened and saved, so their save is in a different way.

    I pretty much have a small bit of understanding on how to insert (merge) an entire menu (section? for lack of better word -File/View/Edit, etc.) from the child to the MDI Parent, but what I'd like to do is to have a File/Save menu on each child and ONLY merge the SAVE menu from each into the MDI parent's File menu.

    Is this possible?
    If so, how (nothting I've done so far makes it work)?
    Last edited by sputnik75043; 09-20-2012 at 8:40 AM.

  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,457
    Reputation
    2727
    In child menu you set MergeAction for each menu item. File item and its subitems to keep in child you set to MatchOnly, the Save item you set to Replace.

  3. #3
    sputnik75043 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 3.5
    Join Date
    Aug 2010
    Posts
    13
    Reputation
    47
    That works, thanks - - one more thing, though.
    I set the File menu item to match only, but it shows on both the MDI Parent and the MDI child.

    Is there a way to make it NOT show on the child form (other than programmatically)?
    Last edited by sputnik75043; 09-20-2012 at 12:10 PM.

  4. #4
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,457
    Reputation
    2727
    In the case the child File item is the only item of that branch that remains after merge you can just set Visible to False in designer for this item, it need never be visible.
    sputnik75043 likes this.

  5. #5
    sputnik75043 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 3.5
    Join Date
    Aug 2010
    Posts
    13
    Reputation
    47
    thanks - it all works great now

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Harvest time tracking