|
|
|
|
- Image associated with an element
- Associating one or more images with an element
- Format of images
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:: Image associated with the collapsed level: for example:  Image associated with the expanded level: for example:  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:
| | TreeAdd | Adds a "leaf" element (and all necessary nodes) into a TreeView control. | TreeInsert | Inserts a leaf into a TreeView control at a specific position. | TreeModify | Modifies an element (node or leaf) in a TreeView control. |
These functions are also available in prefix syntax:
Remark: If no specific image is associated with the elements of a TreeView control, the "closed folder" icon (  ) and the "opened folder" icon (  ) are used. 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)
Remark: the "tiled tiff" option of 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)
Remarks: - HQ display (High Quality) available.
- Management of sheets in transparent BMP format (32 bits).
- Cursors (*.cur)
- Portable Document Format (*.pdf)
- Scalable Vector Graphics (*.svg)
- WINDEV images (generated by the image editor, *.WDPIC).
The images used can be: Remarks: - 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|