Patch to add RegisterForm procedure to ProjectIntf unit
Original Reporter info from Mantis: sysrpl
-
Reporter name: Anthony Walter
Original Reporter info from Mantis: sysrpl
- Reporter name: Anthony Walter
Description:
This is a patch to make it easier to register custom forms within the lazarus ide.
Normally to register a custom for you need to create a descriptor class and fill out some methods correctly in order to get your custom form to appear in the "File->New..." dialog.
Added RegisterForm to unit ProjectIntf:
procedure RegisterForm(const Package: string; FormClass: TCustomFormClass; const Category, Caption, Description, Units: string);
This patch simplifies that effort greatly by giving users the ability to add forms to the "File->New..." dialog through one easy to use RegisterForm procedure.
Additional information:
Add ProjectInf (included in package IDEIntf) to your package's register unit uses class.
procedure RegisterForm(const Package: string; FormClass: TCustomFormClass; const Category, Caption, Description, Units: string);
Call to register a custom form class with the IDE.
RegisterForm parameters:
Package: The name of the package containing your custom form
FormClass: The class type of your custom form
Category: The group under which your form class apears in the New... dialog
Caption: The name of your form class as it appears in the New... dialog
Description: A brief summary of your form class as it appears in the New... dialog
Units: A list of units to add the uses clause of a unit with your form class
(Typically just the name of the unit defining your form class)
example:
procedure Register;
begin
RegisterForm('mypackage', TMyForm, 'My Personal Forms', 'My First Form', 'A custom form I can reuse', 'MyFormUnit');
end;
Mantis conversion info:
- Mantis ID: 32182
- OS: any
- OS Build: any
- Build: trunk
- Platform: any
- Version: 1.9 (SVN)
- Fixed in revision: 55557 (#2bc306e6)