<< Click to Display Table of Contents >> Navigation: 1. Starting Guides > 1.9.1 Types of controls > 1. Starting Guide |
Starting Guide
Treeview Control
What controls do we have to do with?
Treeview" as the AI imagines it.
A Treeview Control might look something like this:
In the Windows Inspector, the Treeview displays a window class of systreeview32, as shown below:
Treeviews have the capability to display icons, checkmarks, and even small menus. Here are a few examples:
To select an item in a Treeview Control, we have two options. One way is to describe a path, similar to a file-system path, but leading to a Treeview item instead of a file.
This is done using the TVI. - Tree View Invisible command. You can use wildcards like ? and * in the item description. Here's an example:
TVI.VM_WIN7_x64\Network adapters\Intel(R) PRO/10?? MT*
Alternatively, you can use the TVF. - Tree View Find command to directly locate the item you want. In this case, you can use all 3.2 Standard-Search Pattern to locate the item.
Here's an example:
TVF.Intel(R) PRO/1000
' Now here is a complete example, that will open a PopUp Menu on
' the item we have located using TVI.
STW.wct|60|MMCMainFrame|Device Manager
SCW.wcd|60|SysTreeView32|7
TVI.VM_WIN7_x64\Network adapters\Intel(R) PRO/1000 MT*
' Open the Menu, click on Properties
SMH.Properti
MRC.
Here's another example that would locate the first of the two Intel CPUs in the device manager:
TVI.VM_WIN7_x64\Processors\Intel(R) Core(TM)2 Quad CPU*
What if we want to get the second of the two items? In that case, you would write:
TVI.VM_WIN7_x64\Processors\Intel(R) Core(TM)2 Quad CPU*|2|
'Don't leave the second | away, its needed!
TVI. and TVF. have a special syntax. If they have just two parameters, the second parameter is the flags.
If they have three parameters, the second parameter is the count while the third parameter is the flags.
' You can do this
TVF.Intel(R)
' or do this using a flag
TVF.Intel(R)|i
' or do this using a flag and a number to choose the second
' fitting element
TVF.Intel(R)|i|2
Now, here's what the Windows Inspector shows you when you analyze the Windows 7/x64 Device Manager:
The picture below shows another type of Treeview. This one contains checkmarks. You can check them using the
TVI. ..|b
and uncheck them using the
TVI...|d
flags. Do not try BTC. here, it will not work.Below you can see the windows inspector showing the TestApp_x64 Treeview.
Treeview" as the AI imagines it.
There's another type of Treeview that you should be aware of. It's an MSI-customizing Treeview:
This is a customizing Treeview Control. We have a separate chapter about it:
See also: