Discussion of article "DoEasy. Controls (Part 6): Panel control, auto resizing the container to fit inner content"

 

New article DoEasy. Controls (Part 6): Panel control, auto resizing the container to fit inner content has been published:

In the article, I will continue my work on the Panel WinForms object and implement its auto resizing to fit the general size of Dock objects located inside the panel. Besides, I will add the new properties to the Symbol library object.

Compile the EA and launch it on a symbol chart:


So, the panel adapts to the general size of the objects attached to it, different binding methods work correctly and the panel changes its size correctly as well. When placing objects with different binding methods, they are not arranged as I would like — they should not be attached to the edges of the panel, and each subsequent object in the list should be attached to the edges of the previous one if it has the same binding. In particular, the very last object is stretched to the full width and height of the container which is incorrect since it should be limited to the inner edges of objects previously bound to the edges of the panel, i.e. it should be set within the free space between them. I will implement the correct behavior of bound objects in subsequent articles.

Author: Artyom Trishkin