Share via


Imagelist.width Method

Definition

Retrieves the width, in pixels, of the images in the image list.

public:
 virtual int width();
public virtual int width ();
abstract member width : unit -> int
override this.width : unit -> int
Public Overridable Function width () As Integer

Returns

An integer that represents the width of the images in pixels.

Remarks

The width of the images in the list is set when you instantiate the list.

The following example creates an image list that has the standard height and width for icons, and then prints the width of images in the list.

Imagelist list; 
list = new Imagelist( 
    Imagelist::iconWidth(), 
    Imagelist::iconHeight()); 
print list.width();   
pause;

Applies to