Compartir a través de


Imagelist.add(Image) Method

Definition

Adds a new image to the image list.

public:
 virtual int add(Dynamics::AX::Application::Image ^ _image);
public virtual int add (Dynamics.AX.Application.Image _image);
abstract member add : Dynamics.AX.Application.Image -> int
override this.add : Dynamics.AX.Application.Image -> int
Public Overridable Function add (_image As Image) As Integer

Parameters

_image
Image

The new image to add to the list.

Returns

0 if the method is successful.

Remarks

You can use the autoResize method to automatically resize images when you add them to the list.

The following example creates a new image list and adds three images to it.

ImageList list = new Imagelist( 
    Imagelist::smallIconWidth(), 
    Imagelist::smallIconHeight()); 
list.add(new Image(3104)); 
list.add(new Image(1097)); 
list.add(new Image(1200)); 
// Prints 3 
print list.count(); 
pause;

Applies to