Since the old Image Editor wasn't installed I figured I could just create my
own rc file with some bitmap lines, compile it using the resource compiler
and rename the .res file to .dcr:
(example of the .rc file)
--
TStatusLabel BITMAP StatusLabelIcon.bmp
TRelayList BITMAP RelayListIcon.bmp
--
However, after registration in the IDE, the component icon looks corrupted
and weird on the palette. (It looks mirrored and has some pixel corruption,
although I can see that it's my image)
My questions is:
- How does people create the DCR files nowadays whithout the old Image
Editor, is my way described above the suggested way? (I cant find anything
useful in the help)
- Whats the guidelines for the actual BMP file regarding color depth, RLE
compressing etc? (I know is should be 24x24 in size)
Can someone share some light over this?
Regards
Magnus Flysjö
> TStatusLabel BITMAP StatusLabelIcon.bmp
> TRelayList BITMAP RelayListIcon.bmp
Palette images need to be named in all uppercase.
> However, after registration in the IDE, the component
> icon looks corrupted and weird on the palette. (It looks
> mirrored and has some pixel corruption, although I can
> see that it's my image)
The color depth in the bitmaps is probably too high.
Gambit
It doesn't seem to be a "must" in Delphi2007.
The correct bitmap is loaded for each component using a mixed case string,
so this must be an old requirement that isnt a must anymore. But sure, for
backward compatibility the name should always be in uppercase.
>> However, after registration in the IDE, the component
>> icon looks corrupted and weird on the palette. (It looks
>> mirrored and has some pixel corruption, although I can
>> see that it's my image)
>
> The color depth in the bitmaps is probably too high.
>
Well, I am using 8bit (256 colors) at the moment. It would be great if stuff
like this was in the RAD Studio help, but I havent been able to find
anything about any rules regarding the palette icon.
/Magnus
> Well, I am using 8bit (256 colors) at the moment.
You should be ok with that. Historically, problems with the tool palette
display getting messed up was a result of incompatibilities between Delphi
and the OS's video driver.
Gambit
The problem you're seeing has to do with the fact that you can choose
what button/icon size to display in your tool palette. If you right click
on a component and select "properties" you're presented with three choices:
Small (16x16)
Medium (24x24)
Large (32x32)
That's what I have in my trusted D2005 anyway.
If your icon is 24x24 it will look Ok in Medium and perhaps distorted in Small.
I also found this reply about how you can supply component icons of different
sizes:
-----------------------
On 10/01/2006 18:33:04, Atmapuri wrote:
> I know its possible to specifiy several icons
> of different sizes for a single components in D2006 IDE.
> But how?
Append "16" or "32" to the name of the component bitmap for 16x16 and
32x32 bitmaps, respectively. The default bitmap size is 24x24.
So, for a component called TMyComponent, use the following bitmap
names:
TMYCOMPONENT - 24x24
TMYCOMPONENT16 - 16x16
TMYCOMPONENT32 - 32x32
--
Yorai Aminov (TeamB)
-----------------------
I haven't been able to make it work in D2005 though.
You can also find out what the VCL icon bitmaps look like if you open the
dclstd...bpl file in the XN Resource Editor. The file is in the bin folder.
/C-H
>You can also find out what the VCL icon bitmaps look like if you open the
>dclstd...bpl file in the XN Resource Editor. The file is in the bin folder.
>
>/C-H
Forgot to say I can recommend the free XN Resource Editor for
making component icons and other things:
http://www.wilsonc.demon.co.uk/delphi.htm
/C-H
> I also found this reply about how you can supply component icons
> of different sizes:
That's good to know. I never heard of that before.
Gambit
Thanks a lot for the information!
I had the palette icons set to small 16x16 and when I set it to medium the
icon was ok.
/Magnus
> So, for a component called TMyComponent, use the following bitmap
> names:
> TMYCOMPONENT - 24x24
> TMYCOMPONENT16 - 16x16
> TMYCOMPONENT32 - 32x32
Wow, I didn't know that yet. Thanks!
--
Rudy Velthuis [TeamB] http://www.teamb.com
"When ideas fail, words come in very handy." -- Goethe (1749-1832)
> C-H wrote:
>
> > So, for a component called TMyComponent, use the following bitmap
> > names:
> > TMYCOMPONENT - 24x24
> > TMYCOMPONENT16 - 16x16
> > TMYCOMPONENT32 - 32x32
>
> Wow, I didn't know that yet. Thanks!
http://jed-software.com/blog/?p=74
--
JSDialog Pack - TaskDialog for other operating systems:
http://www.jed-software.com/jsd.htm
Visual Forms IDE Add In: http://www.jed-software.com/vf.htm