Picto - TImageList aanmaken met glyphs
This example will show you how to fill a imagelist with the small icons of some applications on your harddisk. Afterwards we will copy this TImageList component to Delphi or C++Builder and use it for a TTreeView component.
1. I've created a new form with a TTreeview component in Delphi. This treeview has 4 items which describe the applications on my PC. Now I like to add the small icons of these applications. In Picto I first go to the 'Create TImageList' window by using the popup menu or the menu of the 'Insert' button. The imagelist is still empty. I specify the width and height of the images (16x16).
2. Now I will search for the small icons of these applications on my harddisk Use the directory listbox to go to the directories of these applications (C:\Program Files\Borland\Delphi\Bin, C:\Program Files\Microsoft Office\Office, C:\Program Files\Picto). Select the main executable. Double click on the cell which shows the EXE file or go to the second tabsheet 'Selected file'. This grid will show all icons (and resource bitmaps) which are included in the selected executable. Most applications contain 2 or 3 icons with different sizes (standard 32x32, small 16x16 and large 48x48).
3. Select the small icon (16x16) and click on the menu 'Insert Image' to add this image to the imagelist. Repeat this for all EXE-files and images we need.
4. When all images are added, go back to the 'Create TImageList' form. Now you can see all images which were added. Change their order by using the small buttons beneath the grid or press the Ctrl (Copy) or Shift (Move) key and change the order with the mouse.
5. Click on the 'Copy' button to copy this imagelist to the clipboard.
6. Switch to Delphi and paste the TImageList component. Fill the Images property of the TTreeView to show these images in front of the item's captions.