Howard Page-Clark wrote 32 lines
On 31/8/11 3:34, Zaher Dirkey wrote:
> Is it possible in the future to have this feature
>>
>> Add an png file to the package, when compile the package it
>> automatically convert it to the .lrs file related to this package,
>> it is useful for adding image icons for our controls.
>>
>
> When you create a new component for a package you can select an icon
> (not only png).
>
> Creating an lrs from a png is a one liner on the console/terminal.
>
> Thanks for your replay, but it is more easy for newbe Lazarus users or
> for lazy people like me.
>
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.
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.
Howard
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.
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?
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110831/9a2cb371/attachment-0001.html>