Solved

Custom components issue n. 2

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to send memory stream from ics Client To ics server ? 11 83
Performance of SQL statement 37 101
Base1 Encode/Decode 3 68
Dynamically Created Query 3 50
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now