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

 

Checkmark Control

Selecting Options.

 

clip0549

The checkmark control is often used to have the user to confirm something.

 


Understanding the Checkmark Control

 

Firstly, let's take a look at a "Checkmark Control". Here's an example:

 

graphic

 

The windows-inspector for this control might appear as follows:

 

graphic

 

The presence of "check" in the class-name "TCheckbox" is a strong indicator that we're dealing with a genuine checkmark.

Typically, checkmarks have two states: checked and unchecked.

 

 

graphic

 

It's important to note that Checkmark Controls differ from Radio Button Controls in that they operate independently of each other. Checking one will not alter the state of another checkmark within the same dialog.

To uncheck the checkmark above, you would use the following script:

 

' Get the application Setup-window

STW.ct|TWizardForm|Setup - UltraVNC

 

' Locate the checkmark-child window

SCW.ct|TCheckBox|Download Vista

 

' Set the checkmark to unchecked

BTC.0

 

' End the script.

ENR.


 

clip0551

 

Interacting with the Checkmark Control

Ideally, with the SPR, we don't merely click on a checkmark with the mouse.

Instead, we use the dedicated BTC command, accompanied by a parameter (0 or 1) that indicates the desired state of the checkmark.

This approach offers an advantage: it makes us independent of the checkmark's previous state.

Regardless of whether the checkmark was checked or unchecked, the BTC command will attempt to achieve the state we want.

 

The windows inspector displays a checkmark as follows:

 

graphic

 

Window Class Variations for Checkmark Controls

The window class for a checkmark might be labeled as "button", or it could contain "check" in the name. However, this isn't always the case. The window class could bear different names as well. Given that window classes can be named at the programmer's discretion, the window class for a checkmark control can vary.

 

Normally you can change the value of an checkmark using the BTC.-command.

 

' BTC.-Sample

STW.ct|PBWindowClass:0|BCS - Testform

SCW.nct|1|Button|I definitely agree with the License of this Testform.

BTC.1

 

There may be checkmark controls out there, that do not react on the BTC. - Button-Check-command as we would expect it.

In that case use the normal mouse clicks to change their state.

 


 

clip0552

 

Understanding Treeview Controls with Built-In Checkmarks

Consider the treeview control shown below. It appears to have built-in checkmarks. The windows-inspector identifies it as "systreeview32". However, it's important to note that these are not actual checkmarks, and as such, the BTC command cannot be used with them!

 

 

graphic

 

As the window-class shows, this is a treeview. And we need to use the treeview commands for it.

graphic

 

This is not a checkmark control. It is a  "Treeview-Checkmark". The windows-inspector will show it as a treeview "systreeview32".

In this case you need to use the TVI.- or the TVF. - Tree View Find.-command with its options to check and uncheck the boxes.

There are other checkmarks out there which are also not true checkmarks. For example this one:

 


 

clip0553

 

graphic

 

Understanding Listbox Controls with Checkmarks

The elements you see are not actual checkmark controls. Instead, they are part of a Listbox that includes checkmarks. To check or uncheck these Listbox Checkmarks, you'll need to use the LBE command along with its options.

The windows-inspector, as shown below, identifies it as a Listbox, specifically "TNewCheckListBox".

 

To check the first checkmark in this case, you would use the following code:

 

STW.HBJwct|45|TWizardForm|Setup - UltraVNC

SCW.wctd|45|TNewCheckListBox|Server Konfiguration:|5

' This will check the Listbox-Checkmark

LBE.UltraVNC Server als System-Dienst &registrieren||1

 

 

graphic

 

In some cases, when the Listbox-commands do not work, you can often still locate the Listbox using the SAO. command. And then just click it with the mouse using MLI - Mouse Left Click quIckly (Invinsible) , or use the MOS. - Mouseless Object Select-command.

 


 

clip0550

 

See also:

 

These are the most used commands for checkmarks:

 

    BTC. - Button-Check

    GBC. - Get-Button-Check

    MLI - Mouse Left Click quIckly (Invinsible)

    MLM - Mouse Left click Move (Invinsible)

    SAO. - Search Accessible Object

    !. NAV - NAVigate in Dialog

    MOS. - Mouseless Object Select

    TVI. - Tree View Invisible

    LBE. - Listbox-Entry