I made simple project with one PngBitBtn and then compiled it with following configuration:
The only way to show caption correctly is turn off optimization. Is it possible to solve this problem without turning off optimization?
Thank you in advance, Tim
Tested on Delphi XE3, XE6. Platform: win32. PNGComponents version: newest from embarcadero CodeCentral.
print screen:
Simply a bug!
To fix it, insert the following line at line 326 in PngBitBtn.pas method TPngBitBtnStyleHook.DrawButton:
Offset := TPoint.Create(0, 0);
The code in that area should now look like this:
if not (Control is TPngBitBtn) then
begin
inherited;
Exit;
end;
Offset := TPoint.Create(0, 0);
DrawRect := Control.ClientRect;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With