Dear admin,
I tested an example file that are attached at the end of the article.
When I clicked on the menubar/mainmenu. their contextmenu didnt show completely.
Please give me some advice
Thank you.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
New article Graphical Interfaces II: The Main Menu Element (Chapter 4) has been published:
This is the final chapter of the second part of the series about graphical interfaces. Here, we are going to consider the creation of the main menu. The development of this control and setting up handlers of the library classes for correct reaction to the user's actions will be demonstrated here. We will also discuss how to attach context menus to the items of the main menu. Adding to that, we will mention blocking currently inactive elements.
Developing the Class for Creating the Main Menu
Classes for creating all elements for building the main menu of the program were developed in the previous three chapters. We have the following classes:
Create the MenuBar.mqh file in the Controls folder located in the directory containing the files of all elements. In this file, include the file containing the base class, file with the form class and files of all compound elements that will constitute it:
The basic objects of the main menu are the background and menu items. Context menus will be attached to the items of the main menu via pointers.
Fig. 1. Basic pats of the main menu.
Author: Anatoli Kazharski