WebView.ControlWithName

From Real Software Documentation

Jump to: navigation, search
Method

WebView.ControlWithName ( Name As String ) As WebControl

Returns the WebControl with the specified Name. If Name is invalid, Nil is returned.


Example

The ControlWithName example project uses this method of the WebView class to get the name of the WebCheckBox that was checked.

If the user has specified a WebCheckBox that exists, the method toggles it.

Dim cb As WebCheckbox
cb = WebCheckbox(self.ControlWithName("Checkbox" + TextField1.Text))
If cb = Nil Then
MsgBox("There is no checkbox with the name: Checkbox" + TextField1.Text)
Else
cb.Value = Not cb.Value //toggles the checkbox
End If
Personal tools