Author Topic: (Phoenix) The ImageList-Control - makes things easier.  (Read 3992 times)

0 Members and 1 Guest are viewing this topic.

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • User-Rate: +30/-4
    • it-berater
(Phoenix) The ImageList-Control - makes things easier.
« on: May 19, 2007, 03:44:26 PM »
The help-file says it like this:

Quote
t is used to manage a collection of bitmaps or icons that is used by other controls.  Image lists are not controls and do not receive user input.  The images are stored in a resource file when the project is built and compiled.

What is it good for?

I wondered about it when i saw it the first time. In fact its not a control.
It's the easy way to get pictures/icons into:

- Toolbars
- Menüs
-Treevies
etc.

I was surprised to see, that all these things can be done without writing a single line of code!

I want to share these steps with you:

1. Create the Form
2. Add a "Image-List"
3. Select the Image-List,
4. choose "Properties" and add all Icons or pictures to the Image List, using the "Add button"
5. Select the Toolbar or Treeview (for Example)
6. Select Properties.
7. In the Object-inspector on the right side there is now an Property "Image List".
8. Just click on this and select your "image List" in the dropdown-menü.
9. Now you can choose these pictures in the property of the Toolbar (/Treeview/Menü etc.).

In case of a Toolbar you can specify a "Image List" with the standard-pictures and one with the pictures for "Mouseover".
No need to write extra code for that.

In case of Menü's, there is something more to do:

1) Open the Menu editor.
2) Select the General tab.
3) Check Owner Draw(Cool Menu).
4) Click button or Close command when done.

Thats all.

Now there is a  real-time preview.
While you change the pictures, just click apply and its shown in the Menu-Editor.
 
Let me just add, that the pictures can be used as icons (on the left side) or the menu can be userdrawn completely.

Source: Phoenix Visual Designer
« Last Edit: August 04, 2007, 07:06:31 PM by Theo Gottwald »