Mega Code Archive

 
Categories / Delphi / Examples
 

End-user form design

Guy Smith-Ferrier examines solutions for end-user form design: allowing the user to move and resize components on a form, saving and restoring new form designs, allowing the user to add new components and fields, and to specify validation for new fields. Way back in the 1980s there was an approach to application development called data- driven programming. The idea was that to some extent the application could be configured from data. That is, a database could hold a database schema, screen layouts, report designs, etc. This was well suited to the era, because many of the languages back then were either interpreted (eg dBase) or p-code compilers with built-in runtime expression parsers (eg Clipper). One of the benefits of this approach was that you could leave the design of the application open-ended. You could design the application for the majority of users, but allow more sophisticated users to bolt new fields onto the database and redesign their forms, adding the new fields. If you write an application which would benefit from the end-user being able to modify the application after it has been written, then this article is for you. Goals In this article we will look at the solutions to some of the basic requirements of end-user form design. The solutions offered will not be right for all circumstances, but the basic techniques can easily be modified to suit your specific needs. The goals which we need to achieve are: Allow the user to move and resize components on a form. Allow the new form design to be saved and later restored. Allow the user to add new components and/or fields. Allow the user to specify validation for the new fields. We will look at each goal in turn.