Tuesday, December 06, 2005

D2006: Designtime Components support different image sizes

Ever since the Delphi tool palette supported different button sizes the images on the Tool Palette where stretched. This unfortunately didn't look the best. This issue has been addressed in Delphi 2006.

You can now name your component image resources with a 16 or 32 after them to indicated that the image is to be used when displaying the Tool Palette in small or large button sizes.

For consistency if the images resource name is the component name then that image is used for the medium button size. This image is also used for the Form Designer. If the component name resource cannot be located then the default image is loaded, even if you have a 16 and 32 image specified.

Things always go better when you show some pictures so here you are:

The dcr file was built with the following script and compiled with brcc32 (from the bin folder of your installation).

TSomeComponent16 BITMAP TSomeComponent16.bmp
TSomeComponent BITMAP TSomeComponent.bmp
TSomeComponent32 BITMAP TSomeComponent32.bmp





























This also works with VCL.NET packages.

3 Comments:

Blogger Daniel "sakura" Wischnewski said...

Though that is "just" an IDE feature, and then it is "just" a nice touch, I do really like that feature and the fact that Borland has provided three bitmaps for all their components. That gives the whole IDE a clean look. Great job :-)

8:18 PM  
Anonymous Anonymous said...

You're welcome!

:)

-Adam

4:25 AM  
Blogger iSkomorokh said...

Thanks a lot for the information!

11:47 PM  

Post a Comment

<< Home