Contents - Index - Top


SetInputCheckboxByName

Interface AntViewDocument

 

Type: Method

Parameters: String Name Boolean Checked

Returns: nothing

 

 

Can be used to check or uncheck the checkbox for an html input element of type checkbox identified by Name in the document currently loaded in the WebView2 component.

 

This triggers the OnSetInputCheckboxByName event on completion as it is an asynchronous operation.

 

Note that the Name is case sensitive and must match the case of the html element.

Multiple elements can match the name passed. If this is the case then only the first element that matches the name will be set.

 

For the following example in html:

        <div class="loginRemember">

            <input type="checkbox" name="remember" value="memory" />

            <label for="remember">Remember UserName</label>

        </div>

The name to use is "remember", so in VB6 the code looks like:

  Document.SetInputCheckboxByName "remember", True

 

There's also a synchronous alternative SetInputCheckboxByNameSync that wraps the property and event into one call. This gives you the possibility to immediately check the result after executing the method.

 

See also: RequestInputCheckboxByName

 

Example: 

Fill Form Example

 

Introduced in AntView release 1.1.354

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024