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
Finds the index of an element in a TreeMap control from the element path. This path was specified in <TreeMap>.Add.
Example
// The TMAP_Wine control is filled from a Table control.
// Find the element corresponding to the selected element in the Table control
SelectionPath is string
SelectionPath = COL_WineType[TABLE_WINE] + "\" + COL_Owner[TABLE_WINE]
ElementIndex = MAP_Wine.Seek(SelectionPath)
// Select the element in the TreeMap control
IF ElementIndex <> - 1 THEN
TMAP_Wine = ElementIndex
END
Syntax
<Result> = <TreeMap control>.Seek(<Element path> [, <Start index>])
<Result>: Integer
  • Index of the element found,
  • -1 if no element corresponds to the search.
Remark: The element found can be handled directly using its index. You can for example modify the properties of this element or select it in the TreeMap control.
<TreeMap control>: Control name
Name of the TreeMap control used.
<Element path>: Character string
Path and caption of the sought element. This path must be identical to the one used when the element was added into the TreeMap control by <TreeMap>.Add.
The separator of different path elements can be:
  • the "\" character. For example: "MyDirectory\MyFile".
  • the "TAB" character. For example: "Desserts"+TAB+"Ice cream".
<Start index>: Optional integer
Index of the element from which the search will be performed. If this parameter is not specified, the search is performed in the entire TreeMap control. This parameter is used to find all the occurrences of a path.
Component: wd290obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help