简体   繁体   中英

Merging menustrip items from MDI child into parent's menu

I have a MDI child form which has got some menu options under File tag. Also I have some menu options under the same File tag in the MDI parent form. How to merge the options under the File menu so that they appear under a single File menu when the child form is maximized. I tried the steps given in the following stackoverflow questions but I did not get the desired solution.

Merge menu strip items for MDI windows

Merge menu items from MDI child into container's menu

Following the steps given in the above questions, I have two File menus appearing in the menu bar. 在此输入图像描述

How to resolve this?

I used this solution:

  • Set the MergeAction property of your mdi child File menu to MatchOnly
  • Set the Visible property of the menu strip of your child mdi form to false

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM