ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeMap functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds an element into a TreeMap control.
Example
// Remplit un champ TreeMap avec le contenu d'un champ Table
Chemin is string
TreeMapDeleteAll(TMAP_Vin)
FOR I = 1 _TO_ TABLE_VIN.Occurrence
	Chemin = TABLE_VIN.COL_Typevin[I] + "\" + TABLE_VIN.COL_Proprietaire[I]
	SWITCH TABLE_VIN.COL_Typevin[I]
		CASE "ROUGE"
			TreeMapAdd(TMAP_Vin, Chemin, TABLE_VIN.COL_Prix[I], LightRed)
		CASE "BLANC"
			TreeMapAdd(TMAP_Vin, Chemin, TABLE_VIN.COL_Prix[I], White)
		CASE "ROSÉ"
			TreeMapAdd(TMAP_Vin, Chemin, TABLE_VIN.COL_Prix[I], PastelRed)
	END
END
Syntax
<Result> = TreeMapAdd(<TreeMap control> , <Element path> , <Element weight> [, <Element color>] [, <Tooltip text>])
<Result>: Integer
  • Index of the added element,
  • -1 if an error occurred.
Remark: The added element can be manipulated directly via its index. 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+"Crème brulée".
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: 03/27/2025

Send a report | Local help