customize the GUI at runtime
In many cases the software developer is faced with the problem of allowing the user to move the components of a form. Typically these cases could be a program where the user can add custom data. Adding custom data by the user typically involves the addition of fields in the database. This implies the obligation to add controls in the GUI that will handle the giving of these fields. These controls aren't known by the programmer during the software development and their creation is done dynamically at runtime. The dynamic creation of controls raises many configuration problems. One of the most important is their position in the forms.
Sure, the programmer can set up routines that calculate these positions. But a much more flexible and elegant way is to let the user define the positions of these controls as they wish. It's the function of movControl component, it allows application developers to adopt this solution in a simple and effective way.
Now the question is how to implement these ideas ?
A very important point is that the way forward could be used frequently and often in several places in the same software application. That is why this solution should be easy and quick to implement. Ideally, a large part of this implementation should be done during the design.
This is a typical case where the component-oriented development provides the best solution to adopt. This is the solution that I adopt here. I will present the development of a component which will allow you to provide, easily, this functionality to users. This component is written in Object Pascal language for Delphi™ and Lazarus IDEs.