Components and Component Icons. lazarus / 10-Designer ---------------------------------------------------------------------- taazz · 2012-10-18 20:57 How is the icon of a component get picked when it is installed in the IDE to be shown on the component palette? In delphi just adding a bmp resource to the package with the components name in uppercase was enough to show it but that does not seem  to work for lazarus. any hints where to look for the information would be appreciated. ---------------------------------------------------------------------- Phil · 2012-10-18 21:05 Quote from: taazz on October 18, 2012, 10:57:38 pmHow is the icon of a component get picked when it is installed in the IDE to be shown on the component palette? Look at any of the example components. Usually they include a resource like this: {$I iphtml.lrs} Thanks. -Phil ---------------------------------------------------------------------- taazz · 2012-10-18 21:10 Yeah, the idea that to include the .lrs in the package is not enough struck me just now. it seems that I have to included the old fashion way otherwise it is not executed. that's one strike for me. Just to be on the safe side there is no problem with name of the resource it can be what ever case I want or I should be careful? thank you for your time. Very much appreciated. ---------------------------------------------------------------------- Phil · 2012-10-18 21:18 Quote from: taazz on October 18, 2012, 11:10:51 pm Just to be on the safe side there is no problem with name of the resource it can be what ever case I want or I should be careful? I think the convention is usually to name the .lrs after the file it's included in, but it's just an include file, so it shouldn't matter. What matters is the name of the image files in the resource - it needs to match a component. If you have a lot of glyphs you can just supply a list to lazres, eg, lazres myglyphs.lrs @myglyphs.txt where the .txt file contains a list of files. Both .png and .bmp work. Thanks. -Phil ---------------------------------------------------------------------- taazz · 2012-10-18 21:30 Let me say that when I say resource I mean the a single image in the file it self and not the resource file per see. Now to answer my own question as long as the resource is included with the {$I} directive and the name of the image is  the same as the component registered in the component palette that image will be shown, the case of the image name does not matter at all. At least that is what my last build shown to me. I hope I didn't missed anything important in the process. Thank you for your time once. It was appreciated. PS as a proof here is the picture of the palette, don't mind the last component it does not have an image in the file. thank you again for your time.