[Lazarus] lazarus resources

Everton Vieira tonvieira at gmail.com
Tue Feb 7 15:23:14 CET 2012


I`ve make a very easy lazarus resource file, is annexed: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unEdit_Add_Rem.lrs
Type: application/octet-stream
Size: 21633 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120207/b076dbaa/attachment-0002.obj>
-------------- next part --------------
, with two png files insides, and i`m using like this:

btnAdd.Glyph.LoadFromLazarusResource('edit_add');

initialization
  {$I unEdit_Add_Rem.lrs}

Generates this error:

Exception Class: EInvalidGraphic
With the Message: TGlyphBitmap: Unsupported Resourcetype: PNG Resource Name: edit_add

Stack Trace:
00 - 0046C8E0 TGRAPHIC__LOADFROMLAZARUSRESOURCE, line 263 of ./include/graphic.inc.
01 - 00430940 TFMFILTRAR__BTNADDCLICK, line 246 of unFiltrar.pas.
02 - 004F0754 TCONTROL__CLICK, line 2288 of ./include/control.inc.
03 - 00531C21 TCUSTOMSPEEDBUTTON__CLICK, line 117 of ./include/speedbutton.inc.
04 - 005332E5 TCUSTOMSPEEDBUTTON__WMLBUTTONUP, line 799 of ./include/speedbutton.inc.
05 - 0040B8BA , line 9423 of .
06 - 004EE948 TCONTROL__PERFORM, line 1083 of ./include/control.inc.
07 - 004E4C62 TWINCONTROL__ISCONTROLMOUSEMSG, line 4606 of ./include/wincontrol.inc.
08 - 004E5EE9 TWINCONTROL__WNDPROC, line 5206 of ./include/wincontrol.inc.
09 - 00419F4E TCUSTOMFORM__WNDPROC, line 1362 of ./include/customform.inc.
10 - 00561867 DELIVERMESSAGE, line 110 of lclmessageglue.pas.
11 - 0050CFEE WINDOWPROC, line 2441 of win32callback.inc.
12 - 0059913F CUSTOMFORMWNDPROC, line 357 of win32wsforms.pp.
13 - 77D28709 , line 0 of .
14 - 77D287EB , line 0 of .
15 - 77D289A5 , line 0 of .
16 - 77D289E8 , line 0 of .


I tough TSpeedButton could read png images.


Any suggestions?


More information about the Lazarus mailing list