ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView functions
  • Format of collapsed/expanded images
  • Type of collapsed/expanded images
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Modifies an element (node or leaf) in a TreeView control.
Example of TreeView control:
Vocabulary linked to a TreeView control
Example
// Modify the caption of "Desserts" node in the "TREE_TVRecipe" TreeView control
Res = TreeModify(TREE_TVRecipe, "Recipes" + TAB + "Desserts", "Ice creams")
// Modify the root image in the "TREE_TVRecipe" TreeView control
Res = TreeModify(TREE_TVRecipe, "Recipes", Null, ...
"C:\MyImages\Img1.GIF", "C:\MyImages\Img2.GIF")
Syntax
<Result> = TreeModify(<TreeView control> , <Path of element to modify> , <New caption> [, <New collapsed image> [, <New expanded image> [, <New element identifier> [, <Tooltip text>]]]])
<Result>: Boolean
  • True if the element was modified in the TreeView control,
  • False otherwise.
<TreeView control>: Control name
Name of the TreeView control to be used.
<Path of element to modify>: Character string
Full path of element to modify. This parameter has the following format:
"<Root name>" + TAB + ["<Name of 1st node>" + TAB + ...
["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
<New caption>: Character string
  • New caption for the specified element,
  • NULL constant to keep the existing caption.
<New collapsed image>: Optional character string or constant
New image associated with the specified element. This image is displayed when this element is collapsed (see the Remarks). This parameter corresponds to:
  • the name and full (or relative) path of image. A UNC path can be used.
  • the constant:
    NullStores the image of specified element
    tvDefault
    (Default value)
    Default image (closed folder): Closed folder
<New expanded image>: Optional character string or constant
New image associated with the specified element. This image is displayed when this element is expanded (see the Remarks). This parameter corresponds to:
  • the name and full (or relative) path of image. A UNC path can be used.
  • the constant:
    NullStores the image of specified element
    tvDefault
    (Default value)
    Default image (opened folder): Open folder
<New element identifier>: Character string or integer (optional)
New identifier of element or the NULL constant to keep the identifier of specified element.
Caution: The TAB character cannot be used in the identifiers of elements.
<Tooltip text>: Optional character string
If this parameter is specified, its content will be displayed in a tooltip when the element is hovered by the mouse cursor. This parameter corresponds to an empty string by default. If no tooltip is associated with the element, the tooltip associated with the TreeView control will be automatically displayed.
Remarks

Format of collapsed/expanded images

WINDEV 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).

Type of collapsed/expanded images

The images used can be:
The specified image is proportionally resized to 16 x 16 pixels: in most cases, the height of the image corresponds to the height of TreeView row.
Remark: The size of images should be set to 16 x 16 pixels (size of small icons).
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help