CREATE PICT
PLBCMP GUI Only
The CREATE PICT statement initializes a PICT object variable. The statement format is:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
parent
Optional. A previously created WINDOW or PANEL object variable or pointer to a WINDOW or PANEL object on which the object is created.
pict
Required. The name of a previously defined PICT object variable or pointer to a PICT object.
pos
Required. The screen position of the object given as: {top}:{bottom}:{left}:{right}.
data
Required. A Character String Variable, a character Literal, a Numeric Variable, an Expression, or a decimal constant defining the picture source.
property list
Optional. One or more of the object properties.
Flags Affected: NONE
Note the following:
The {pos} screen coordinates for the object must be given and must be valid. Each of the coordinates may be a numeric variable, an Expression, or a decimal constant.
If {data} is a numeric variable, an expression or a decimal constant, the picture is loaded from the program resources. If the value is zero, the picture is loaded from the clipboard.
If the {data} operand is a character variable or character literal and contains a file name, the picture is loaded from the given file name. If the file name is null, a dialog box is displayed to allow image selection. If a file extension is not specified, ".bmp" is assumed. The runtime attempts to locate the file using the PLB_PATH specification.
The file extension does not determine the picture file type. Thus, if a TIFF file is named with a .BMP extension, the file is processed as a TIFF file.
When running under the PL/B Application Server, the first character of the file name has special meaning:
|
First Character |
The file ... |
|
! (exclamation mark) |
resides on the client rather than the server. |
|
? (question mark) |
should be obtained from the cache or from the server and placed in the cache. |
|
* (asterisk) |
should be obtained from the in-memory cache or from the server and placed only in the in-memory cache. |
If the {data}
operand is a character variable whose first character is a 0x4, the picture is loaded directly from the
variable. The second character defines the format of the picture as follows:
|
Value |
Format |
|
0x1 |
BMP |
|
0x2 |
PCX or DCX |
|
0x3 |
GIF |
|
0x4 |
TIF |
|
0x5 |
JPG (9.7A) |
Supported TIF formats are CCITT Group 1, CCITT Group 4, Packbytes, and LZW Packbits.
If two or more pictures are created with the same screen coordinates, the ACTIVATE of a PICT while another PICT has is active merges the images.
The default page number for DCX format files is one (1).
If the optional {parent} parameter is not specified, the default window is used.
If {data} is not found during the creation of the object, the runtime generates an O102 error.
The image format is determined by the runtime and is not influenced by the file extension.
See Also: Example Code, CREATE, Object Output Instructions
![]() |