ICON Property


PLBCMP GUI Only

 

The ICON property allows use of an image in place of the text for an object. The property uses the following format:

 

ICON={value}

Note the following:

  1. ICON may be used in CREATE or SETPROP statements for BUTTON and WINDOW objects only.

  2. If {value} is a Character String Variable, it specifies the name of an icon file. 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. For BUTTONs, if {value} is a Null String, the ICON property is removed and the text is used.

  4. If the icon file name does not have an extension, a default extension of '.ico' is assumed.

  5. The file name supports $MACRO and :VOL name formats and the runtime attempts to locate the file using the PLB_PATH specification.

  6. If {value} 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 in the range of 10,000 to 10,999 are reserved as the Sunbelt resource numbers for the runtime standard icons. If the {value} resource number has a 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.

  7. If {value} is zero, the ICON property is removed and the text is used for BUTTON objects.

  8. To remove the icon from a WINDOW object, set the SYSMENU property to FALSE.

  9. If {value} is an ICON object, the bitmap must have been previously created.

  10. This property is not supported by Windows CE.

  11. The ICON property is supported for the PWS BUTTON object by the PL/B Web Server. The client browser downloads and renders the image into HTML button object. PLB developers can evaluate the 'plbwebbasic.css' class 'button img' which is used by default by the PWS runtime. In addition, the PLB developers can create custom CSS classes that can be specified using the WEBCLASS property to control rendering of the images by the client browser. The images for the ICON property can be specified as follows:

  12.  

    1. The property can be specified as a resource number which must be a '.ico' resource type.

    2. The property can be specified as a specific ico\image file name where the image file must reside in or under the PWS images directory identified by the 'PLBWEB_IMAGES={directory}' keyword. The default when this keyword is not used is the PWS 'http_root\images' directory. The support for the '.ico' image file type depends on the client browsers.

    3. The property can be specified as an ICON object.

 

 

See Also: Object Properties, Object IO Instructions, Object Definitions

 



PL/B Language Reference HWND Property IMAGECOLORS Property