• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

D3 Component Pallete Icons

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
jelkiors
Asked:
jelkiors
  • 5
  • 4
1 Solution
 
viktornetCommented:
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
 
jelkiorsAuthor Commented:
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
 
viktornetCommented:
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
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!

 
viktornetCommented:
Would you please send me the ICO file and I'll send you the .dcr with a sample .pas file....
0
 
viktornetCommented:
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
 
jelkiorsAuthor Commented:
Thanks, Viktornet

cu again sometime
0
 
viktornetCommented:
Did it work???

Regards,
Viktor Ivanov
C'Ya
0
 
jelkiorsAuthor Commented:
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
 
jelkiorsAuthor Commented:
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now