WebButton.Caption

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As String )


aWebButton.Caption = newStringValue
or
StringValue = aWebButton.Caption

New in 2010r5

Supported for all project types and targets.

Gets or sets the text of the button.

Notes

Buttons can only have a single-line caption.

Sample Code

This code in the Pressed event handler changes the text of the button each time it is pressed:

If Me.Caption = "Blue" Then
Me.Caption = "Red"
Else
Me.Caption = "Blue"
End If