Solved

D3 Component Pallete Icons

Posted on 1998-09-12
9
223 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 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