[Lazarus] lazarus resources

Everton Vieira tonvieira at gmail.com
Tue Feb 7 15:49:20 CET 2012


Thanks!

Em 07/02/2012, às 12:32, Felipe Monteiro de Carvalho escreveu:

> Each class can only read 1 format.
> 
> btnAdd.Glyph is a TBitmap and therefore reads only bitmaps. But you
> can first read to a PNG and then use Assign to convert to a bitmap.
> 
> Try doing it like this:
> 
> var
>  MyPNG: TPortableNetworkGraphic;
> begin
>  MyPNG := TPortableNetworkGraphic;
>  MyPNG.LoadFromLazarusResource('edit_add');
>  btnAdd.Glyph.Assign(MyPNG);
>  MyPNG.Free;
> 
> -- 
> Felipe Monteiro de Carvalho
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





More information about the Lazarus mailing list