PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Initializing a TreeMap control
  • Handling a TreeMap control associated with a Table control
  • Overview
  • Displaying in the TreeMap control the element selected in the Table control
  • Displaying in the Table control the element selected in the TreeMap control
  • Displaying in the TreeMap control the group selected in the Table control
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
Overview
WINDEV allows you handle a TreeMap control by programming. To do so, use the variable of the TreeMap control in the code.
The variable of the TreeMap control corresponds to the name of the TreeMap control.
The TreeMap control can be handled by programming via:
Note: You also have the ability to handle an element found in a TreeMap control by programming.
Initializing a TreeMap control
To initialize a TreeMap control, all you have to do is describe all the elements with TreeMapAdd.
Note: A TreeMap control can be filled by programming with:
  • the records from a data file,
  • the elements of a Table control, ...
Example:
// Fill a TreeMap control from a browsing table
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
Handling a TreeMap control associated with a Table control

Overview

When a TreeMap control visually displays the elements found in a Table control, it may be useful to allow interactions between the two controls. For example:
  • select in the TreeMap control the element selected in the Table control (and conversely).
  • select in the TreeMap control the group selected in the Table control.
Let's see some examples of operations that can be performed.

Displaying in the TreeMap control the element selected in the Table control

To display in the TreeMap control the element selected in the Table control, all you have to do is use TreeMapSeek.
Example:
SelectionPath is string
SelectionPath = COL_WineType[TABLE_WINE] + "\" + COL_Owner[TABLE_WINE]
TMAP_Wine = TreeMapSeek(TMAP_Wine, SelectionPath)

Displaying in the Table control the element selected in the TreeMap control

To display in the Table control the element selected in the TreeMap control, all you have to do is use TableSeek.
Example: This code can be entered in the selection code of an element found in the TreeMap control:
Path is string
Path = TMAP_Wine[TMAP_Wine]
Path = ExtractString(Path, 2, "\")
RowSubscript is int = TableSeek(COL_Owner, Path)
TableSelectPlus(TABLE_WINE, RowSubscript)

Displaying in the TreeMap control the group selected in the Table control

To display in the TreeMap control the group of elements selected in the Table control, all you have to do is use TreeMapSelectGroup.
Example:
SelectionGroup is string
SelectionGroup = COL_WineType[TABLE_WINE]
TreeMapSelectGroup(TMAP_Wine, SelectionGroup)
Minimum required version
  • Version 15
Comments
Click [Add] to post a comment