And what about the file <b>$HOME/.lazarus/environmentoptions.xml</b> ?<br>According to unit <b>EnvironmentOpts</b> it can hold a "newformtemplate".<br>Is this a not-yet-implemented feature? If it is, how could I help finish it?<br>
<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><span style="font-family: courier new,monospace;">procedure TMainIDE.mnuNewFormClicked(Sender: TObject);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">var</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Category: TNewIDEItemCategory;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> Template: TNewIDEItemTemplate;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Desc: TProjectFileDescriptor;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> Flags: TNewFlags;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">begin</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> Category:=NewIDEItems.FindByName(FileDescGroupName);</span><br style="font-family: courier new,monospace;"><b><span style="font-family: courier new,monospace;"> Template:=Category.FindTemplateByName(EnvironmentOptions.NewFormTemplate);</span></b><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> if (Template is TNewItemProjectFile) and Template.VisibleInNewDialog then</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Desc:=TNewItemProjectFile(Template).Descriptor</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> else</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Desc:=FileDescriptorForm;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> Flags:=[nfOpenInEditor,nfCreateDefaultSrc];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> if (not Project1.IsVirtual) and EnvironmentOptions.AskForFilenameOnNewFile then</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> Flags:=Flags+[nfAskForFilename,nfSave];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Desc.Owner:=Project1;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> try</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> DoNewEditorFile(Desc,'','',Flags);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> finally</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Desc.Owner:=nil;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> end;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">end; </span><br style="font-family: courier new,monospace;">
</blockquote><br>My .lazarus xml file does not have these tags.<br><br><div class="gmail_quote">2011/2/11 Mattias Gaertner <span dir="ltr"><<a href="mailto:nc-gaertnma@netcologne.de">nc-gaertnma@netcologne.de</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Fri, 11 Feb 2011 12:17:54 -0200<br>
Alexsander Rosa <<a href="mailto:alexsander.rosa@gmail.com">alexsander.rosa@gmail.com</a>> wrote:<br>
<br>
> Is there a place to define the "default" values for some Form properties<br>
> when a "New Form" is created by IDE?<br>
> I know I could use inheritance, but it seems a little overkill when all I<br>
> want is to define width and height properties.<br>
<br>
</div>You can define your own forms, use the project templates, use the<br>
inherited form or patch the IDE.<br>
There is no "All I want to" thing.<br>
Defining some default values for component classes is a nice feature,<br>
but if you ask ten developers you get ten different ideas how to do<br>
that. That's why such a feature is better provided by a package.<br>
<br>
<br>
Mattias<br>
<font color="#888888"><br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Atenciosamente,<br>Alexsander da Rosa<br><a href="http://rednaxel.com" target="_blank">http://rednaxel.com</a><br>