<div dir="ltr"><div class="gmail_quote">On Wed, Aug 31, 2011 at 5:45 PM, Howard Page-Clark <span dir="ltr"><<a href="mailto:hdpc@talktalk.net">hdpc@talktalk.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 31/8/11 3:34, Zaher Dirkey wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is it possible in the future to have this feature<br>
<br>
Add an png file to the package, when compile the package it<br>
automatically convert it to the .lrs file related to this package,<br>
it is useful for adding image icons for our controls.<br>
</blockquote>
<br>
When you create a new component for a package you can select an icon<br>
(not only png).<br>
<br>
Creating an lrs from a png is a one liner on the console/terminal.<br>
<br>
Thanks for your replay, but it is more easy for newbe Lazarus users or<br>
for lazy people like me.<br>
</blockquote>
<br></div>
I presume you are aware that selecting an icon for a new component in the Package Editor causes automatic generation of an appropriate .lrs file for the icon, provided the icon has the same name as the new component class (ignoring extension), and that it is no bigger than 24x24 pixels? Lazarus also auto-generates in the Register procedure an appropriate {$I componentUnitName_icon.lrs} line as well. So provided you are only adding one new component, everything is done for you by the IDE, except for designing the icon.<br>
If you want several icons to be registered in one unit for several components, then you do have to write a bit of code, and use the lazres.exe tool to generate the correct .lrs file yourself.<br>
<br>
Howard<br clear="all"></blockquote></div><br>The idea, i have some of icons in a package, sometime i redesign it, i forget to recall lazres, i put batch file for it, but it is not bad idea to when compiling the package it also call lazres automatically for it.<br>
<br>It is not that necessary feature, so you can ignore it, but how can i make it without touch the Lazarus source, Is Addons allow me to do that?<br><br>Zaher Dirkey<br>
</div>