Mattias Gaertner wrote 14 lines
On Mon, 29 Nov 2010 10:21:07 +0100
Joost van der Sluis wrote:
> Hi all,
>
> Is it possible to add a 'new module' option to the ide which has by
> default some components on it?
>
> With a TFileDescPascalUnitWithResource, it is possible to add a new
> module type, but I can't find out a way to add some components on it by
> default. (I could add the definitions to the code, offcourse, but how to
> add them to the resource?)
You can specify the lfm. Override the method GetResourceSource.
Thanks. It has a bug, though. If I use it to generate something else then a form, using a designer. It still handles the component/resource as if it was a form.
That's because CreateRawComponentFromStream is called for the just generated resource. Which assumes a form. CreateNewForm, on the other hand, handles the non-lcl-component right. (CreateNewForm is used when there's no resource-content given)
Shall I create a bug-report?
Joost.