AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones TreeView
  • "Sibling" node
  • Duplicates
  • Format of collapsed/expanded images
  • Type of collapsed/expanded images
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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
Ejemplo
// Insert the "Cakes" leaf on the same level as
// the "Ice creams" leaf in the "TREE_TVRecipe" TreeView control
// The "Cakes" leaf will be inserted before the "Ice creams" leaf
Res = TREE_TVRecipe.Insert("Recipes" + TAB + "Desserts" + TAB + "Ice creams", ...
"Cakes", tvDefault, tvDefault, Null, tvBefore)
Sintaxis
<Result> = <TreeView control>.Insert(<Path of sibling node> , <Leaf name> [, <Collapsed image> [, <Expanded image> [, <Leaf identifier> [, <Addition mode> [, <Tooltip text>]]]]])
<Result>: booleano
  • True if the leaf was inserted into the TreeView control,
  • False otherwise.
<TreeView control>: Nombre del control
Name of the TreeView control to be used.
<Path of sibling node>: Cadena de caracteres
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:
"<Root name>" + TAB + ["<Name of 1st node>" + TAB + ...
["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
If there are two elements with the same name in the path, you can add the IDs of the elements (after their names using TreeID).
<Leaf name>: Cadena de caracteres
Name (caption) of leaf to insert.
<Collapsed image>: Cadena de caracteres opcional o constante
Image associated with the inserted element. This image is displayed when the element is a collapsed node (see the Notes). At runtime, 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:
    NullNo image
    tvDefault
    (Default value)
    Default image (closed folder):Closed folder
<Expanded image>: Cadena de caracteres opcional o constante
Image associated with the inserted element. This image is displayed when the element is an expanded node (see the Notes). At runtime, 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:
    NullNo image
    tvDefault
    (Default value)
    Default image (opened folder):Open folder
<Leaf identifier>: Cadena de caracteres o entero (opcional)
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 <TreeView>.Modificar.
<Addition mode>: Constante opcional
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>: Cadena de caracteres opcional
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.
Observaciones

"Sibling" node

If the "brother" node doesn't exist, insertion is not performed: the function <TreeView>.Insert returns False.

Duplicates

<TreeView>.Insert does not control duplicates when an element is inserted.
To easily handle duplicates, it is recommended to use a specific identifier to identify the level in which an element will be inserted. For more details, see Managing duplicates in the TreeView controls.

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 in TIFF 6.0 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).
  • Novedad versión 2025
    Images in WebP format (*.webp).
WEBDEV - Código Servidor The following image formats are supported: GIF, JPEG, PNG or SVG (depending on the browser).

Type of collapsed/expanded images

The images used can be:
  • image files,
  • items of a "Binary Memo" HFSQL data file containing an image.
  • drawings created with the graphic string functions.
The specified image is scaled down to 16 x 16 pixels: in most cases, the height of the image corresponds to the height of the line in the TreeView control.
WEBDEV - Código Servidor Only image files can be used. These files must be 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 We recommend using 16 x 16 pixel images (size of small icons).
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 23
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 06/12/2024

Señalar un error o enviar una sugerencia | Ayuda local