Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Share Me

  • Please share this topic with your friends. Click any of the icons below:
  • Twitter
  • facebook
  • reddit
  • email

TLMDPNGImageList and get PNG Image

Hi,

I have a TPNGImageList on a form, and i want to dynamically assign a png file to a button.
How can i get the TPNGIMage from this component ? I can get a TLMDPNGObject, but i don't know what to do with it.

Thanks

Comments

  • 1 Comment sorted by Votes Date Added
  • TLMDPngObject is a TGraphic descendat, so any standard operation can be applied.
    Example:
    SpeedButton1.Glyph.Assign(LMDPngImageList1.Png[0]);
    Assigns first image from imagelist to the Glyph property of SpeedButton. Sample applies to e.g. TBitmapOject.
    Note: Advanced functionality like transparent areas might work only in themed/styled projects.

    Apart from that (e.g. when you want to convert object) you can draw image on any canvas using the Draw method.
Sign In or Register to comment.