Discussing the article: "The View and Controller components for tables in the MQL5 MVC paradigm: Resizable elements"
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: Resizable elements.
In modern user interfaces, a feature to resize elements with the mouse is a familiar and expected one. The user can "grab" the border of a window, panel, or other visual block and drag it, resizing the element in real time. Such interactivity requires a well-thought-out architecture to ensure responsiveness and correct handling of all events.
One of the popular architectural approaches for building complex interfaces is MVC (Model-View-Controller). In this paradigm:
Within the context of resizing elements with the mouse, the main work takes place precisely at the level of the View component. It implements a visual representation of the element, tracks mouse movements, determines whether the cursor is on the boundary, and displays appropriate tooltips (for example, changing the cursor shape). The component is also responsible for rendering the resized element during the resizing process when being dragged.
Author: Artyom Trishkin