hiLoadIconFile
hiLoadIconFile(t_fileName x_width x_height) =>l_hiIcon/nil
Description
Loads an icon file of any format, such as PNG, and returns the icon in a format that can be used with hi functions that accept icons. If t_fileName is a relative path, the Cadence Search File mechanism (CSF) is used to search for the file.
Multiple resolutions of the icon are loaded, if found. The appropriate resolution is used when the icon is used.
This function provides you the ability to add your own icons for custom toolbars, menus, and forms. You can place these icons in a subdirectory of your home directory. Similarly, central groups can provide icons for your entire site in a different location. Any icons you provide must be placed in an icons/16x16, icons/24x24, icons/32x32, or icons/48x48 subdirectory of a directory found by CSF. These directories should represent the resolution of the image files in them.
Follow these guidelines when you create icons:
- While any format supported by Qt is supported, PNG is preferred.
- Limit icons to 256 color.
- Use a consistent icon palette.
Arguments
Values Returned
|
The icon handle, which can be used with any user interface function that accepts icons. l_hiIcon is of the following form: |
|
|
t_fileName is not found or there was an error in loading it. |
Examples
?itemIcon hiLoadIconFile( "wire.png" 16 16 )
Related Topics
Return to top