Is it possible to load an image from a TImageList into a TTrayIcon at runtime? How? Is this a good idea? Or is there a more preferred method for changing the tray icon’s image at runtime?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Tested on Windows with Lazarus 0.9.30.4 using an image list composed of translucent png images, it is possible by using a temporary bitmap:
I don’t see anything wrong with assigning the icon from an image list image at run-time. Also see example at the component’s wiki page for other possible implementations for assigning the icon at run-time.