[DUG] Component icon change help
David Moorhouse
delphi at moorhouse.net.nz
Fri Jan 4 23:56:47 NZDT 2008
Hi Vikas
Your component registration unit should look something like this ..
unit CompReg;
interface
procedure Register;
implementation
{$R *.DCR}
uses
Classes, DesignIntf,
MyComp;
const
Palette_Page = 'MyPage';
procedure Register;
begin
RegisterComponents(Palette_Page, [TMyComp]);
end;
end.
Where MyComp is the unit that contains the code for your component class,
TMyComp.
You will also need to create the DCR file, with the same base name (i.e.
MyComp.DCR). This contains a 24x24 16 color bitmap named the same as the
component class e.g. "TMYCOMP".
If you're still having trouble, try unregistering your package - then
restarting Delphi before loading and installing the package again.
HTH
D
On Fri, 4 Jan 2008 15:35:48 +0530, you wrote:
>well Jermy yeah i did that too sorry i dint emntioned it
>
>but none seems to work in the desing pallte it show the same default icon
>
>one more queryy wen u create a dcr file we add only bitmap right or bitpam
>icona nd cursor has to be included
>
>
>
>
>On 1/4/08, Jeremy Coulter <vss at vss.co.nz> wrote:
>>
>> take a look at the DCR file for the component (or another other controls
>> dcr) from memory dcr = delphi component resource.
>> This is where you put the icon for a component, and then instead of {$R
>> test.res} you do {$R test.dcr}
>> Once again...thats from memeory, but I think its right.
>>
>> Jeremy
>>
>> ------------------------------
>> *From:* delphi-bounces at listserver.123.net.nz [mailto:
>> delphi-bounces at listserver.123.net.nz] *On Behalf Of *Vikas...
>> *Sent:* 4 January 2008 18:10
>> *To:* NZ Borland Developers Group - Delphi List
>> *Subject:* [DUG] Component icon change help
>>
>>
>> Hi,
>>
>> I am actually new to component creation in delphi. I developed one
>> component whose ancestor is derived from tcomopent. But i came up with one
>> trouble that is i dotn want the component to have it default look i crated
>> one resource file using delphi iamge editor and btmap in it. Then i included
>> {$R test.res} under inface section, But i still takes the default compoent
>> look. I even tried .dcr file but that diesnt seems to help me.
>> Please anyone can help me how do i change the compoent default look and
>> let it handle the bitmap aperace as i mentioned in my res file.
>>
>> One more thing i tried other compoent style of writing and i checked their
>> resource file using resource hacker exe. I found my resource file is
>> correct. i am sure i am missing a imporant step somewhere which i am not
>> able to figure out.
>>
>> Regards
>> Vikas
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at listserver.123.net.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
>> Subject: unsubscribe
>>
More information about the Delphi
mailing list