Discussing the article: "The View and Controller components for tables in the MQL5 MVC paradigm: Simple controls"
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
Check out the new article: The View and Controller components for tables in the MQL5 MVC paradigm: Simple controls.
Today we will start developing simple controls, from which composite elements will further be created. Each control element will possess functionality for interaction with the user and with other elements. In other words, this is nothing more than the functionality of the Controller component.
Since in the MQL language the event model is integrated into objects created using chart events, event handling will be organized in all subsequent controls to implement the connection between the View component and the Controller component. To do this, refine the base class of graphic elements.
Next, create simple controls — a text label and various buttons. Each of these elements will have the feature to draw icons. This will make it possible to create completely different controls from simple buttons. If you look at the string of the tree view, where an icon is on the left and text is on the right, then this seems to be a separate control. But we will be able to easily create it using a regular button. At the same time, it will be possible to adjust the string parameters so that it either reacts by changing the color when the mouse cursor is focused on and clicked, or it is static, but reacts to clicks.
All this will be easy to implement with a few strings of object settings after its creation. And from such elements, we will continue to create complex composite controls that are fully interactive and ready to use.
Author: Artyom Trishkin