PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • "Sibling" node
  • Duplicates
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Inserts a leaf into a TreeView control at a specific position. This insertion is performed in relation to an existing "sibling" element.
Example of TreeView control:
Vocabulary linked to a TreeView control
Example
// Insert the "Cakes" leaf on the same level as
// the "Ice creams" leaf in the "TREE_RecipeTV" treeview
// The "Cakes" leaf will be inserted before the "Ice creams" leaf
Res = TreeInsert(TREE_RecipeTV, "Recipes" + TAB + "Desserts" + TAB + "Ice creams", ...
"Cakes", tvDefault, tvDefault, Null, tvBefore)
Syntax
<Result> = TreeInsert(<TreeView Control> , <Path of Sibling Node> , <Leaf Name> [, <Collapsed Image> [, <Expanded Image> [, <Leaf Identifier> [, <Add Mode> [, <Tooltip Text>]]]]])
<Result>: Boolean
  • True if the leaf was inserted into the TreeView control,
  • False otherwise.
<TreeView Control>: Control name
Name of TreeView control to use.
<Path of Sibling Node>: Character string
Full path of "sibling" node of leaf that will be inserted into the TreeView control. This sibling node must exist. This parameter has the following format:
"<Name of Root>" + TAB + ["<Name of 1st Node>" + TAB + ...
["<Name of 2nd Node>" + TAB + [...]]]"<Leaf Name>"
In case of duplicates on a path element, this path can contain the element identifier (specified at the end of its name by TreeID).
<Leaf Name>: Character string (with quotes)
Name (caption) of leaf to insert.
<Collapsed Image>: Character string (with quotes) or optional constant
Image associated with the inserted element. This image is displayed when the element is a collapsed node (see the Notes). At run time, the caption of a collapsed node is preceded by "+".
This parameter corresponds to:
  • the name and full (or relative) path of image. A UNC path can be used.
  • the constant:
    tvDefault
    (Default value)
    Default image (closed folder): Closed folder
    NullNo image
<Expanded Image>: Character string (with quotes) or optional constant
Image associated with the inserted element. This image is displayed when the element is an expanded node (see the Notes). At run time, the caption of an expanded node is preceded by "-".
This parameter corresponds to:
  • the name and full (or relative) path of image. A UNC path can be used.
  • the constant:
    tvDefault
    (Default value)
    Default image (opened folder): Opened folder
    NullNo image
<Leaf Identifier>: Character string (with quotes) or optional integer
Character string or integer associated with the inserted element. This parameter corresponds to an empty string ("") by default. To associate an identifier with an element that is already created, use TreeModify.
<Add Mode>: Optional constant
Position of inserted leaf in relation to the "sibling" node in the TreeView control.
tvAfter
(Default value)
The leaf is inserted after the specified "sibling" element.
tvBeforeThe leaf is inserted before the specified "sibling" element.
<Tooltip Text>: Optional character string (with quotes)
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

"Sibling" node

The insertion is not performed if the "sibling" node does not exist: TreeInsert returns False.

Duplicates

TreeInsert does not check the duplicates when an element is inserted.
To easily manage the duplicates, a specific identifier should be used to identify the level where the insertion must be performed. See Managing duplicates in the TreeView controls for more details.

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

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.
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.
Note: The size of images should be set to 16 x 16 pixels (size of small icons).
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
Java wd230java.jar
Linux wd230obj.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment