Discussions
Sign In
•
Register
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In with LMD account
Sign In with LMD account
Categories
Recent Discussions
Categories
All Categories
1.1K
NG Controls
28
Announcements
60
LMD IDE-Tools
209
LMD ElPack
373
LMD-Tools
414
Feature Requests
38
In this Discussion
Rafael Maricca (LMD)
February 2016
TLMDPNGImageList and get PNG Image
AER Côtes d'Armor
February 2016
in
LMD-Tools
Vote Up
0
Vote Down
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
Rafael Maricca (LMD)
February 2016
Posts: 0
Vote Up
0
Vote Down
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.
Comments