On Thu, 13 Aug 2015 00:06:34 +0200 Marc Santhoff <m.santh...@web.de> wrote:
>[...] > Good example. > > I do not fully understand the creation mechanism. I see an extra > register procedure in "frmexploremenu.pas" that actually sets the menu > entry. I thought a constructor of the extension class would be called. > But since it is a modal form that is done by execution of the menu code. > > Instead there is a notify event "FormCreate()", where is that one > called? Is it done that way by convention? Did I miss some piece of > documentation? It is set by the lfm, which is parsed in the forms constructor. >[...] > > It opens all forms of the project. > > OK, not what I want. What strategy can be used to get a list of forms in > the users project without having to open them all? If you need the list of all units with designer, you can simply search for lfm files. If you want only specific classes, you have to check each lfm. >[...] > > > Afterwards, will the new component created and have owner, parent and > > > essential properties set and then added, like I would do in any other > > > program creating components in code at runtime or is there another way > > > (sth. like "IDEDoCreateComponetntAndAdd(newcomponent.class)")? > > > > Maybe such a function can be added to the IDEIntf. > > In principle making something like "designer/designer.pp > TDesigner.MouseUpOnControl AddComponent" publicly available would > suffice. It needs various parameters: ComponentClass ParentComponent Left,Top, Optional: Width,Height Optional: Name Would that suffice? > > Can you give some more details what you are trying to achieve? > > I'm only learning how to do basic actions. Playing around, that is. > > Currently it is planned to show a list of available forms and let the > user select one. Then he would select the parent component for one or > more new components to insert. Just an idea: Why not select the form and parent component, by right clicking on the parent component and start the wizard via a menu item in the popup menu? > All done from a modal form, and if > feasible it will evolve to some sort of multi step "wizard" or > "assistant" dialog triggering complex actions. Mattias -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus