AddLargePicture

Description

Adds a bitmap, icon, or cursor to the large image list.

Applies to

ListView controls

Syntax

listviewname.AddLargePicture ( picturename )

Argument

Description

listviewname

The name of the ListView control to which you are adding a bitmap, icon, or cursor

picturename

The name of the bitmap, icon, or cursor you are adding to the large image list

Returns

Integer. Returns the picture index if it succeeds and -1 if an error occurs.

Usage

When you add a large picture to a ListView, it is given the next available picture index in the ListView. For example, if your ListView has two pictures, the next picture you add will be assigned picture index number 3.

Before you add large pictures, you can specify scaling for the pictures by setting the LargePictureWidth and LargePictureHeight properties. The dimensions in effect when you add the first picture determine the scaling for all pictures. Changing the property values after you add pictures has no effect.

If you do not specify values for LargePictureWidth and LargePictureHeight before you add pictures, the dimensions of the first image determine the scaling for all pictures you add.

When you add a bitmap, specify the color in the bitmap that will be transparent by setting the LargePictureMaskColor property before calling AddLargePicture. You can change the LargePictureMaskColor property between calls.

Examples

Example 1

This example adds the file folder.ico"to the large picture index of the ListView lv_files:

// Add large picture

integer index

index = lv_files.AddLargePicture("folder.ico")

See also