[Lazarus] What for Adding lrs file to Package?

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Sep 13 00:04:09 CEST 2011


On Tue, 13 Sep 2011 00:08:37 +0200
Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:

> Zaher Dirkey schrieb:
> 
> > After i added lrs file to the unit that register my controls, the icons 
> > showed.
> 
> IMO it's a matter of {$R some.res}, what makes icons (and other 
> resources) usable in code. AFAIK the standard {$R *.res} only includes 
> the <programname>.lrs file,

No. lrs files are simple include files. They are included as
string constants.

> that's why it worked when you put your icons 
> into that file. But it should be possible to add further {$R ...} 
> directives, to include other resource files as well.

The $R directive supports icons in ico format. AFAIK it does not
support png.

Mattias




More information about the Lazarus mailing list