SmallPictureName[ ]

Applies to

ListView controls

Description

PowerBuilder stores ListView images in several indexed arrays of images. You can associate an image with a specific ListView item when you create a ListView in the painter or use the AddItem and InsertItem functions at execution time.

You identify a specific image by its index number. Because the same index number refers to both the large picture and the small picture for the item (depending on which view is selected), you need to make sure the images for each position in the array are compatible. The type of picture used in the control is determined by the value of the control's View property.

Usage

In a painter

To specify images for the Small Icon view

  1. Select the Small Picture tab page from the ListView control's Properties view.

  2. Do one of the following:

    • In the rows provided in the Picture Name field, type the complete path and name of the files containing the desired pictures.

    • Use the Browse button.

    • Select one or more pictures from the Stock Pictures list.

    The order of the picture names specified here should match the picture name order used for the Large Icon view.

  3. Use the row numbers from this Picture Name list to specify the Picture Index for each List View Item on the Items tab page.

In scripts

The SmallPictureName property takes a string value. You cannot use the SmallPictureName property to update the image list during execution. Use the AddSmallPicture function to add small pictures to a ListView control. For example:

lv_1.AddSmallPicture("c:\ArtGal\bmps\celtic.bmp")

When you add a small picture to a ListView control, it is given the next available picture index in the ListView.

For more information about scripting ListView controls, see the section called “Using ListView controls” in Application Techniques.