Discussion of article "Graphics in DoEasy library (Part 96): Graphics in form objects and handling mouse events"

 

New article Graphics in DoEasy library (Part 96): Graphics in form objects and handling mouse events has been published:

In this article, I will start creating the functionality for handling mouse events in form objects, as well as add new properties and their tracking to a symbol object. Besides, I will improve the symbol object class since the chart symbols now have new properties to be considered and tracked.

Compile the EA and launch it on the chart. Two forms with the ability to drag them with a mouse independently of each other are created. Each current form is always located above other objects — on the foreground, while data on a selected form is displayed in the chart comments:


We can see that the forms can be relocated independently of each other, while the chart remains fixed. Each active form is always located on the foreground. However, there are considerable drawbacks as well: if we move the chart with the mouse and the cursor touches the form area, it becomes active and can be managed. Cursor coordinate changes relative to the form reference point can occasionally be calculated incorrectly after the chart is dragged by the mouse.

I will detect and fix all these drawbacks during the further development.

Author: Artyom Trishkin