CREATE ICON


PLBCMP GUI Only

square.png Properties

square.png Events

square.png Methods

square.png Instructions

 

The CREATE ICON statement initializes an ICON object variable. The statement format is:

 

 

[label]

CREATE

[{parent};]{icon}={top}:{left}:

 

 

 

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

icon

Required. The name of a previously defined ICON object variable or pointer to an ICON object.

top

Required. A Numeric Variable, an Expression, or a decimal constant defining the top position of the ICON.

left

Required. A Numeric Variable, an Expression, or a decimal constant defining the left position of the ICON.

data

Required. A Character String Variable, Numeric Variable, an Expression, or a decimal constant defining the image.

property list

Optional. One or more of the object properties.

Flags Affected: NONE

Note the following:

  1. The top and left 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 Character String Variable, it specifies the name of an icon file. If the icon file name does not have an extension, a default extension of '.ico' is assumed. The name supports $MACRO and :VOL name formats and the runtime attempts to locate the file using the PLB_PATH specification. If the file name of the resolved icon file name begins with a less-than (<) character, the runtime loads and uses this icon file as a 16x16 small icon. The '<' in the resolved icon file named must be specified before an other special characters.

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

  4.  

    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 {data} is a numeric variable or decimal constant, it specifies the resource number of the image. A set of standard icons has been provided as internal resources in the Sunbelt runtimes. The resource numbers 10,000 to 10,999 are reserved as the Sunbelt resource numbers for the runtime standard icons.

  2. If {data} is a numeric variable or decimal constant with a resource value from 11,000 to 11,500, the Sunbelt runtime loads and uses the icon as a 16x16 small icon. The icon resource numbers in this range of 11,000 to 11,500 are now available as user resource numbers with the stipulation that these icons are loaded as small icons.

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

 

 

See Also: Example Code, CREATE, Object Output Instructions

 



PL/B Language Reference CREATE HSCROLLBAR CREATE IMAGELIST