CREATE PICT


PLBCMP GUI Only

square.png Properties

square.png Events

square.png Methods

square.png Instructions

 

The CREATE PICT statement initializes a PICT object variable. The statement format is:

 

 

[label]

CREATE

[{parent};]{pict}={pos},{data}[,{property list}...]

 

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. When running under the PL/B Application Server, the first character of the file name has special meaning:

  6.  

    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.

 

  1. 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:
     

  2. Value

    Format

    0x1

    BMP

    0x2

    PCX or DCX

    0x3

    GIF

    0x4

    TIF

    0x5

    JPG (9.7A)

 

  1. Supported TIF formats are CCITT Group 1, CCITT Group 4, Packbytes, and LZW Packbits.

  2. 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.

  3. The default page number for DCX format files is one (1).

  4. If the optional {parent} parameter is not specified, the default window is used.

  5. If {data} is not found during the creation of the object, the runtime generates an O102 error.

  6. The image format is determined by the runtime and is not influenced by the file extension.

 

 

See Also: Example Code, CREATE, Object Output Instructions

 



PL/B Language Reference CREATE PANEL CREATE POPUPMENU