Solved

Custom components issue n. 2

Posted on 2014-01-25
2
354 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 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