Solved

D3 Component Pallete Icons

Posted on 1998-09-12
9
224 Views
Last Modified: 2010-04-06
I have a non-visual component that I want to add to the pallete but I want to use an icon file to represent it on forms and the component pallete. How do I tell Delphi that I want to use this instead of that (standard?) multi coloured, many shaped thing that usually comes up ?
0
Comment
Question by:jelkiors
  • 5
  • 4
9 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 1339546
If it's too big then you can not do that...if the size is 16X16 or 32X32 in pixels then you can open the file you want copy the bitmap, open the ImageEditor and paste there....then save it as a .dcr file and that's all....

PS, if the bitmap is larger then 32X32 pixels it still will be pasted but won't show up in the image editor....only part of it will be shown....

Regards,
Viktor Ivanov
0
 

Author Comment

by:jelkiors
ID: 1339547
Sorry viktornet, I've already got the icon as a 32x32 icon file which i created in image editor. If I need to save the icon as a resource do i need to give it any particular name for delphi to link it?

I'm using the following names, please be more specific!

Package file : SinisterSoftware.dpk
Component PAS file: SSPackTable.pas
Class Name: TSSPackTable

Please give me specific instructions. At the moment I have a 32x32 16 color icon file named SSPackTable.ico

hope this helps you to help me. I've been accurately case sensitive to aid you.

Regards

Julie

0
 
LVL 10

Accepted Solution

by:
viktornet earned 50 total points
ID: 1339548
Here is how you name it....

SSPackTable.pas -> SSPackTable.dcr
TSSPackTable -> TSSPackTable

After you create a Bitmap for the component you need to name it TSSPackTable

If you need an example .pas file with a .dcr file I'll send you an empty .pas that has just some kinda of Class e.g. TMyButton and show you how to do it in the .dcr

Regards,
Viktor Ivanov
0
Industry Leaders: 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!

 
LVL 10

Expert Comment

by:viktornet
ID: 1339549
Would you please send me the ICO file and I'll send you the .dcr with a sample .pas file....
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1339550
Would you please send me the ICO file and I'll send you the .dcr with a sample .pas file....
My e-mail is viktor@megsinet.net
0
 

Author Comment

by:jelkiors
ID: 1339551
Thanks, Viktornet

cu again sometime
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1339552
Did it work???

Regards,
Viktor Ivanov
C'Ya
0
 

Author Comment

by:jelkiors
ID: 1339553
Yep, kinda.

I think what I was doing wrong before was trying to use an icon in the resource rather than a pure bitmap.

Anyway, it's sat on my pallete as we speak.

By the way, I've just posted another question about exclusive database tables if you fany having a look at it for me, there's another 50 points in it for you. Answer pretty quick would be good 'cos I've managed to get the computer all to myself without any distractions for about the next 8 hours 'cos the girlfriends gone out.

Thanx,

c u in my other question ?



0
 

Author Comment

by:jelkiors
ID: 1339554
Yep, kinda.

I think what I was doing wrong before was trying to use an icon in the resource rather than a pure bitmap.

Anyway, it's sat on my pallete as we speak.

By the way, I've just posted another question about exclusive database tables if you fany having a look at it for me, there's another 50 points in it for you. Answer pretty quick would be good 'cos I've managed to get the computer all to myself without any distractions for about the next 8 hours 'cos the girlfriends gone out.

Thanx,

c u in my other question ?



0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

726 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