1. Starting Guide

<< Click to Display Table of Contents >>

Navigation:  1. Starting Guides > 1.9.1 Types of controls >

1. Starting Guide

1.9.1 Types of controls

Previous Top Next


Starting Guide

 

Treeview Control

What controls do we have to do with?

 

TC 2

Treeview" as the AI imagines it.

 

Navigating the Treeview Control

 

A Treeview Control might look something like this:

 

graphic

 

In the Windows Inspector, the Treeview displays a window class of systreeview32, as shown below:

 

graphic

 

Treeviews have the capability to display icons, checkmarks, and even small menus. Here are a few examples:

 

graphic

 

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.

 

graphic

 

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:

 

graphic

 

The picture below shows another type of Treeview. This one contains checkmarks. You can check them using the

 

graphic

 

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.

 

 

graphic

 


 

clip0559

Treeview" as the AI imagines it.

 

There's another type of Treeview that you should be aware of. It's an MSI-customizing Treeview:

 

graphic

 

This is a customizing Treeview Control. We have a separate chapter about it:

 

1.A Special Issues

 


 

See also:

 

    TVI. - Tree View Item

    TVF. - Tree View Find

    SAO. - Search Accessible Object

    !. NAV - NAVigate in Dialog