Solved

Custom components issue n. 2

Posted on 2014-01-25
2
355 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month6 days, 11 hours left to enroll

623 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