IMAGELIST
PLBCMP GUI Only
The IMAGELIST object manages a collection of bitmaps or icons images. IMAGELIST objects can be used with LISTVIEW, TOOLBAR, TREEVIEW, and NETCONTROL objects. To define an IMAGELIST, use one of the following statement formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Data Label.
%
Optional. Denotes the item as being GLOBAL.
arraysize
Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.
^
Optional. Denotes the item as being a POINTER.
target
Required. The name of a previously defined data item of the same type.
Flags Affected: NONE
Note the following:
The images in the list all must be the same size.
A single wide bitmap contains the images within an image list. To reference a specific image in the bitmap, an index of the image within the IMAGELIST must be used.
IMAGELIST objects can be masked or non-masked.
A non-masked IMAGELIST contains a color bitmap with one or more images. When a non-masked image is drawn, it is simply copied to the display with no special processing.
A masked IMAGELIST contains two bitmaps. The first bitmap is a color bitmap containing the images. The second bitmap is a monochrome bitmap that contains a series of masks. When a masked image is drawn, the specified mask is combined with the image to produce transparent areas in the bitmap allowing the background color to show.
When a resource id is specified for an IMAGELIST object, the image specified by the resource id is segmented and replaces all the images in the IMAGELIST.
Multi-dimension arrays are supported up to a maximum of fourteen dimensions.
The ^ denotes a Pointer Variable.
IMAGELIST objects may not be added to a COLLECTION.
Although an IMAGELIST may be defined as Global, it is DESTROYed during a CHAIN instruction.
IMAGELISTs can be used used as the assigned imagelist for a .NET property.
Support for an IMAGELIST was added to the PL/B Web Server in version 9.9. This PWS IMAGELIST only identifies a single image which can be sent to the client browser in support of the PWS TREEVIEW object. The PWS IMAGELIST is implemented as a virtual object that is created and maintained on the PWS server side. The PWS IMAGELIST implementation details are described as follows:
Supported properties:
|
Property |
Note |
|
IMAGESIZEH |
The support for this property was added in 9.9 for the PWS runtime objects. Use of this property for the PLBWIN\PLBNET Windows runtimes causes indeterminate results and should be avoided. |
|
IMAGESIZEV |
The support for this property was added in 9.9 for the PWS runtime objects. Use of this property for the PLBWIN\PLBNET Windows runtimes causes indeterminate results and should be avoided. |
|
OBJECTID |
|
|
RUNNAME |
|
|
URLSOURCE |
This property is supported only for the PWS runtimes. This property has no affect or impact on the PLBWIN\PLBNET Windows runtimes. |
|
USERDATA |
|
Unsupported properties:
Any settings for unsupported properties are processed and maintained by the PWS IMAGELIST. However, these settings are ignored and do not affect the image being used by a PWS object.
|
Property |
|
BGCOLOR |
|
IMAGECOLORS |
|
MASKCOLOR |
|
RESOURCE |
|
USECOLORMASK |
|
USEMASK |
Supported event:
|
Event |
|
CHANGE |
Supported Method
|
Method |
Note |
|
LoadStdToolBitMap |
This method sets the URLSOURCE property of the IMAGELIST to the 'plbtools.bmp' image name. The 'plbtools.bmp' must exist in the 'c:\sunbelt\plbwebsrv.9xx\http_root' directory where '9xx' represents the PWS version being used. |
Unsupported methods:
|
Method |
|
AddBmp |
|
AddBmpMasked |
|
AddIcon |
|
AddLoadIcon |
|
AddLoadImage |
|
GetImageCount |
|
Remove |
|
RemoveAll |
|
ReplaceBmp |
|
ReplaceIcon |
|
WriteBmpFile |
PWS IMAGELIST operational behaviors:
The PWS IMAGELIST does not simulate the Windows IMAGELIST control. The Windows IMAGELIST control does not provide operation capilities that are compatible with expected client browser image usage.
The PWS IMAGELIST support allows an image to be identified the URLSOURCE which can be downloaded by a client browser. Once the image is loaded to the client browser, the PWS JavaScript utilizes techniques to slice the image which can be referenced by image index for PWS objects using the PWS IMAGELIST.
Images identified by the PWS IMAGELIST are expected to be a horizontal combination of image segments combined based on the current IMAGESIZEH and IMAGESIZEV values. The format of the PWS IMAGELIST image is the same as exported by the PL/B Designer. The IMAGELIST image index is a value starting with zero representing the image segment at the left-most position in the image.
When an embedded PWS IMAGELIST resource is being used by a PWS object in a PWF form, the embedded resource is dynamically generated as a BMP image named with the following format:
Where:
The "I{guid}{res}.bmp" image can be downloaded by a client browser as required by a PWS object using the IMAGELIST resource. It should also be noted that only one instance of the 'I{guid}.bmp' is created which can be reused by any PLB PWS object of the PWF form using the IMAGELIST resource. The "I{guid}{res}.bmp" images are never deleted by the PWS runtimes. The end-user can remove any or all of these resource working images at any time without causing any application problems.
The behaviors of the PWS IMAGELIST using the URLSOURCE property versus the internal image resource usage for a PWS IMAGELISTcannot be changed and\or invoked using the SETPROP instruction. These behaviors are determined and used when the PWS IMAGELIST is initially created. Use of the SETPROP to change the PWS IMAGELIST URLSOURCE can result in the indeterminate presentation of PWS objects using the IMAGELIST.
See Also: Example Code, Object Definitions, Object Output Instructions
![]() |