Discussion of article "Graphics in DoEasy library (Part 95): Composite graphical object controls"

 

New article Graphics in DoEasy library (Part 95): Composite graphical object controls has been published:

In this article, I will consider the toolkit for managing composite graphical objects - controls for managing an extended standard graphical object. Today, I will slightly digress from relocating a composite graphical object and implement the handler of change events on a chart featuring a composite graphical object. Besides, I will focus on the controls for managing a composite graphical object.

Compile the EA and launch it on the chart:


We can see that the objects take their designated places when the chart changes. However, this happens with a lag.
When removing a graphical object, the appropriate form objects are removed as well.

What can we do with the lag? In fact, we do not need to see the movements live — these moves will always remain hidden when moving the chart (they are displayed now to handle an event response). The graphical object line itself is moved when the form objects are dragged by a mouse. Any interaction with the forms is performed on a fixed chart. So this result is quite sufficient, especially considering that the chart is updated only after the loop completion rather than at each loop iteration. In order to reduce the load, we can control the chart change completion displaying the changes and showing the object afterwards (this is only possible if the cursor hovers over the form object active area when it should become visible).

Author: Artyom Trishkin

Reason: