[Lazarus] derived forms and frames

Franz Müller bupa at gmx.at
Fri Sep 21 15:03:17 CEST 2018


Hello everybody!

I have been developing programs in Delphi for many years (and even 
before in turbo Pascal).
I would like to switch all my programming from Delphi to Lazarus / Free 
Pascal.

Now I have encountered a serious issue that I don't know how to deal with.
I have built a complex framework that I use in my programs. This 
frameworks includes form templates and frame templates from which I 
derive most of the forms of a project. In order to be able to derive a 
new form from a form tempate easily with the means of the lazarus IDE, 
the form template must be part of the project - I don't see another way 
to have a form shown in the menu "file - new".
But in order to make new published properties of the template form 
available in the object inspector, the template form must be compiled as 
part of a package.
But for good reasons it is strongly disadvised to use the same file in a 
package and as part of the project at the same time.

Of course, I could manually modify the source for every new unit that I 
create, but that would be rather cumbersome and error prone.

I would like to ask if there is a solution to the problem that I am not 
aware of - otherwise I would file a feature request. I feel that the 
ability to use forms and frames derived from TForm and TFrame as a base 
for new forms is a very important feature to build an efficient 
programming framework, and this programming framework should not be 
required to be part of every project that uses it. I would suggest a 
procedure similar to "register",  which should place a menu entry for a 
form or a frame from a package into the menu tree "file - new", just 
like register places a component into the component palette.

Best regards
Franz



More information about the Lazarus mailing list