[Lazarus] Accessing the FormEditor from within a non-lcl designer

Joost van der Sluis joost at cnoc.nl
Fri Nov 12 16:20:21 CET 2010


On Fri, 2010-11-12 at 15:40 +0100, Mattias Gaertner wrote:
> On Fri, 12 Nov 2010 15:15:01 +0100
> Joost van der Sluis <joost at cnoc.nl> wrote:
> 
> > Hi all, Mattias,
> > 
> > I would like to use FormEditor.CreateComponent and
> > FormEditor.CreateuniqueComponentName from within a designer-mediator. So
> > I don't have to duplicate that code.
> > 
> > How can I do this? I've tried it using LCLForm.Designer.TheFormEditor,
> > but this is not possible because the TheFormEditor property is defined
> > in the designer.pp unit, which I can not use in a package. 
> > I've tried to move the TheFormEditor property to the
> > ComponentEditorDesigner class, but that leads to circular
> > unit-references.
> > 
> > I can try to find some solution, but maybe you know a better one?
> 
> Maybe:
> http://wiki.lazarus.freepascal.org/Extending_the_IDE#Create_a_new_unique_component_name

Perfect, thanks. That's a nice hook. ;)

Joost.





More information about the Lazarus mailing list