AddIcon Method (IMAGELIST)


PLBCMP GUI Only

 

The AddIcon method insert an icon image to an IMAGELIST object. The method uses the following format:

 

[label]

{object}.AddIcon

[GIVING {return} USING [*Icon]={icon}

 

Where:

label

Optional. A Program Execution Label.

object

Required. An IMAGELIST object to which the image is added.

return

Optional. A Numeric Variable that returns the zero-based index of the new image.

icon

Required. A Character String Variable or Numeric Variable that specifies the file name or resource number of the new image.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. If the method is successful, the zero-based index of the new image is returned. If the method is not successful, {return} will contain a -1.

  2. If the icon image is smaller than the IMAGESIZEH or IMAGESIZEV property, the image is not added and {return} will contain a negative one.

  3. If the value returned is zero, the ZERO Condition Flag is set.

  4. If {return} is too small to contain the new image index, the OVER Condition Flag is set.

  5. The EOS Condition Flag is always cleared.

  6. For improved performance in the Application Server environment, do not specify the optional return value unless needed.

  7. This method is not supported by the PL/B Web Server.

 

 

See Also: Example Code, Method Syntax, IMAGELIST Methods

 



PL/B Language Reference AddBmpMasked Method (IMAGELIST) AddLoadIcon Method (IMAGELIST)