[Lazarus] TSpeedButton glyph png

Paul Ishenin webpirat at mail.ru
Wed Oct 15 12:50:20 CEST 2008


Sebastian Kraft wrote:
>>    Png: TPortableNetworkGraphic;
>> begin
>>    Png := TPortableNetworkGraphic.Create;
>>    try
>>      Png.LoadFromFile('test.png');
>>      Speedbutton.Glyph := Png;
>>    finally
>>      Png.Free;
>>    end;
>> end;
>>
>>     
>
> tried this before, but I get
>
> mainform.pas(3004,18) Error: Incompatible type for arg no. 1: Got "TPortableNetworkGraphic", expected "TBitmap"
>
> on Speedbutton.Glyph:=Png;
>   
Ok,

Speedbutton.Glyph.Assign(Png)

Best regards,
Paul Ishenin.



More information about the Lazarus mailing list