Nieuws
Foto's
Artikelen
Componenten
Applicaties
Kleinkunst

Picto - Glyph maken voor TSpeedButton

This example will show the fastest way to create a glyph containing 3 images which will represent the different states of a button. This new glyph will be used for a TSpeedButton in Delphi or C++Builder.

1. Choose your basic image in the main window. In my example I'm using a smiley icon from a DLL file. (32x32, 16 colors).
2. Click on 'Edit and save bitmap'. This menu can be found in the popup menu when right clicking or in the menu of the 'Save' button. We now enter the edit window.
3. Right click on the image and choose the 'Up' menuitem. This original image will be used to display the normal status of our button.

4. Now I want to create an image which will represent the disabled state. The 'Convert to disabled' function only uses one color (default black color) to create a new image. Windows does the same when it has to show a disabled image and that is why sometimes no image is visible. In these cases the image doesn't contain a black color. To get the best result, first click on the 'Convert to black and white' button. Now the red and grey colors of the image are also converted to black.

5. Use the 'Convert to disabled' function, without changing any option. Just click on OK.



6. Right click and choose 'Disabled'. Now the second image has been added.
7. Because I want to use the original image to create a new 'Down' state image, I click on the 'Restore original' button which will show my original yellow smiley icon. 
8. When my Delphi button is down, I will show a green smiley. So click on the 'Color Balance' button. Change the trackbars so that the smiley will turn green. Click on OK.

9. Right click and use the 'Down' menu. I'm not using a 'Clicked' image so close this window.
10. Go to the 'Create glyph of 4 images' window. Right click and choose this option from the popup menu or use the menu of the 'Insert' button. Now we can see the 3 images which I have created and they are used to create one result glyph. (128 x 32). 

11. Right click on the result image and copy it to as a TSpeedButton.
12. Start or switch to Delphi or C++Builder and paste the button on your form. Without saving any image, a new glyph representing the three states of a button has been created.