Contents - Index - Top


SetInputCheckboxById

Interface AntViewDocument

 

Type: Method

Parameters: String Id Boolean Checked

Returns: nothing

 

 

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

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

 

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

 

For the following example in html:

  <div class="loginRemember">

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

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

  </div>

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

  Document.SetInputCheckboxById "remember", True

 

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

 

See also: RequestInputCheckboxById

 

Example: 

Fill Form Example

 

Introduced in AntView release 1.1.354

 


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