PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Image associated with an element
  • Associating one or more images with an element
  • Format of images
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Associating an image with the elements of a TreeView control
Image associated with an element
Each element found in a TreeVew control is preceded by an image. This image can differ according to the status of the current element (or level). You can display an image:
  • when the level is expanded,
  • when the level is collapsed (or when the level corresponds to a leaf).
Example of TreeView control in a WINDEV application::
TreeView control
Image associated with the collapsed level: for example: Image of collapsed level
Image associated with the expanded level: for example: Image of expanded level
Note: You also have the ability to associate an identifier with an element. See Associating an identifier with an element for more details.
Associating one or more images with an element
To associate one or more images with an element of a TreeView control, all you have to do is specify the name (and the path if necessary) of the image in the following programming functions:
TreeAddAdds a "leaf" element (and all necessary nodes) into a TreeView control.
TreeInsertInserts a leaf into a TreeView control at a specific position.
TreeModifyModifies an element (node or leaf) in a TreeView control.
Versions 23 and later
These functions are also available in object syntax:
Versions 23 and later
<TreeView>.Add
New in version 23
<TreeView>.Add
<TreeView>.Add
Adds a "leaf" element (and all necessary nodes) into a TreeView control.
Versions 23 and later
<TreeView>.Insert
New in version 23
<TreeView>.Insert
<TreeView>.Insert
Inserts a leaf into a TreeView control at a specific position.
Versions 23 and later
<TreeView>.Modify
New in version 23
<TreeView>.Modify
<TreeView>.Modify
Modifies an element (node or leaf) in a TreeView control.
New in version 23
These functions are also available in object syntax:
Versions 23 and later
<TreeView>.Add
New in version 23
<TreeView>.Add
<TreeView>.Add
Adds a "leaf" element (and all necessary nodes) into a TreeView control.
Versions 23 and later
<TreeView>.Insert
New in version 23
<TreeView>.Insert
<TreeView>.Insert
Inserts a leaf into a TreeView control at a specific position.
Versions 23 and later
<TreeView>.Modify
New in version 23
<TreeView>.Modify
<TreeView>.Modify
Modifies an element (node or leaf) in a TreeView control.
These functions are also available in object syntax:
Versions 23 and later
<TreeView>.Add
New in version 23
<TreeView>.Add
<TreeView>.Add
Adds a "leaf" element (and all necessary nodes) into a TreeView control.
Versions 23 and later
<TreeView>.Insert
New in version 23
<TreeView>.Insert
<TreeView>.Insert
Inserts a leaf into a TreeView control at a specific position.
Versions 23 and later
<TreeView>.Modify
New in version 23
<TreeView>.Modify
<TreeView>.Modify
Modifies an element (node or leaf) in a TreeView control.
Note: If no specific image is associated with the elements of a TreeView control, the "closed folder" icon ( Closed folder ) and the "opened folder" icon ( Opened folder ) are used.
Format of images
The following image formats are supported in Windows:
  • Bitmap (*.BMP)
  • Graphics Interchange Format (*.gif)
  • Joint Picture Experts Group (*.jpg ; *.jpeg)
  • Kodak Photo CD (*.pcd)
  • PaintBrush (*.pcx)
  • Adobe Photoshop Format (*.psd)
  • TrueVision TARGA (*.tga)
  • Tagged Image File Format (*.tif ; *.tiff)
    Note: the "tiled tiff" option of the tiff 6.0 standard is not supported. In this case, we advise you to save the image in tiff 5.0 standard.
  • Portable Network Graphics (*.png)
  • Windows MetaFiles (*.emf ; *.wmf)
  • Icons (*.ico ; *.icw)
    Versions 22 and later
    Notes:
    • HQ display (High Quality) available.
    • Management of sheets in transparent BMP format (32 bits).
    New in version 22
    Notes:
    • HQ display (High Quality) available.
    • Management of sheets in transparent BMP format (32 bits).
    Notes:
    • HQ display (High Quality) available.
    • Management of sheets in transparent BMP format (32 bits).
  • Cursors (*.cur)
  • Portable Document Format (*.pdf)
  • Versions 15 and later
    Scalable Vector Graphics (*.svg)
    New in version 15
    Scalable Vector Graphics (*.svg)
    Scalable Vector Graphics (*.svg)
  • Versions 22 and later
    WINDEV images (generated by the image editor, *.WDPIC).
    New in version 22
    WINDEV images (generated by the image editor, *.WDPIC).
    WINDEV images (generated by the image editor, *.WDPIC).
Note: To manage the pdf and svg formats, GDIPLUS.DLL must be installed for the computers running Windows 2000 and earlier. For the later versions, this DLL is supplied with Windows. See GDI+ framework for more details.
Windows Mobile The recognized image formats are as follows: BMP, JPEG, GIF or ICO.
WEBDEV - Server code The recognized image formats are as follows: GIF, JPEG, PNG or SVG (depending on the browsers).
The images used can be:
WEBDEV - Server code Only the image files can be used. These files must be found in the "<ProjectName>_WEB" directory. These images are not transformed when the page is saved. There is no need to use fWebDir to specify the image path. This path is relative to the "<ProjectName>_WEB" directory.
Notes:
  • The specified image is proportionally reduced: the height of the image corresponds to the height of the row in the TreeView control. The size of the images used should be set to 16x16 pixels (size of the small WINDEV icons).
  • The magenta color found in the images is considered as being transparent at run time.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment