ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeMap functions
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
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.Count
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.
Remark: 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
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 the Caption property.
<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: wd300obj.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/06/2023

Send a report | Local help