mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / WebKitXCEF3 Object / SelectElement Method

CSS3 Selector of the element to select.

If you are unfamiliar with CSS3 Selectors have a look in Finding the correct CSS3 Selector article.

If True will move the caret to the selected element.

If True performs a range.selectNodeContents
SelectElement Method
Description

Selects the contents of an HTML5 Element.

Syntax
Visual Basic
Public Sub SelectElement( _
   ByVal Selector As String, _
   ByVal MoveCaret As Boolean, _
   ByVal SelectContents As Boolean _
) 
Parameters
Selector

CSS3 Selector of the element to select.

If you are unfamiliar with CSS3 Selectors have a look in Finding the correct CSS3 Selector article.

MoveCaret

If True will move the caret to the selected element.

SelectContents
If True performs a range.selectNodeContents
Example
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
    
    On Error Resume Next
    
    NoEvents = True
    
    WebKitX1.SelectElement Button.Key, False, True
    
    If mnuSyncDesignerAndSource.Checked Then
        SelectSource Button.Key
    End If
    
    NoEvents = False
    
End Sub
See Also