PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
Adds an element into a TreeMap control.
Example
// Fill a TreeMap control with the content of a Table control
Path is string
TreeMapDeleteAll(TMAP_Wine)
FOR I = 1 _TO_ TABLE_WINE..Occurrence
Path  = TABLE_WINE.COL_WineType[I] + "\" + TABLE_WINE.COL_Owner[I]
SWITCH TABLE_WINE.COL_WineType[I]
CASE "RED"
TreeMapAdd(TMAP_Wine, Path, TABLE_WINE.COL_Price[I], LightRed)
CASE "WHITE"
TreeMapAdd(TMAP_Wine, Path, TABLE_WINE.COL_Price[I], White)
CASE "ROSÉ"
TreeMapAdd(TMAP_Wine, Path, TABLE_WINE.COL_Price[I], PastelRed)
END
END
Syntax
<Result> = TreeMapAdd(<TreeMap control> , <Element path> , <Element weight> [, <Element color>] [, <Tooltip text>])
<Result>: Integer
  • Subscript of added element,
  • -1 if an error occurred.
Note: The added element can be directly handled via its subscript. You can modify the properties of this element.
<TreeMap control>: Control name
Name of TreeMap control to use.
If this parameter corresponds to an empty string (""), the control used will be the TreeMap control to which the current event belongs.
<Element path>: Character string (with quotes)
Path and caption of element to add. The path is used to organize the elements, to group them. The separator of different path elements can be:
  • the "\" character. For example: "MyDirectory\MyFile".
  • the "TAB" character. For example: "Desserts"+TAB+"Ice cream".
The element caption corresponds to the last path element. This name is displayed in the TreeMap control. This name can be modified by ..Caption.
<Element weight>: Real or integer
Weight of element displayed in the TreeMap control.
<Element color>: Optional integer
Background color of element. This color can correspond to:
<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 this parameter is not specified, the tooltip will automatically display the content of the <Element path> parameter.
Component : wd240obj.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment