Solved

Custom components issue n. 2

Posted on 2014-01-25
2
351 Views
Last Modified: 2014-01-26
Hi all.

For one of the components mentioned in my other question (http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_28348188.html), I can't have the icon correctly displayed.

I created a dcr file with ResourceBuilder. Here I added a bitmap 32x32 256 colors calling it with the same of the component in uppercase. The in the unit I use to register the component I wrote the directive

{$R name_of_resource_file.dcr}

For some component works well, for others not and I can't find the difference.

Thanks in advance for any advice.
0
Comment
Question by:Marco Gasi
2 Comments
 
LVL 26

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 39810174
Icon must have same name as class name: TMyClass  -->  TMYCLASS.
Use name notation depending on size of image:

TMYCLASS BITMAP "MyClassImg24x24.bmp"
TMYCLASS16 BITMAP "MyClassImg16x16.bmp"
TMYCLASS32 BITMAP "MyClassImg32x32.bmp"

Make sure that your bitmap is a real 256 colors (8bit).

Additional help in this blog about rebuilding component image cache:
http://www.lnssoftware.ca/blog/?p=140
0
 
LVL 31

Author Closing Comment

by:Marco Gasi
ID: 39810208
Thanks, it solved the problem.
Cheers
Marco
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question