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
StringValue = aWebButton.Caption

New in 2010r5

Supported for all project types and targets.

Gets or sets the text of the button.


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"
Me.Caption = "Blue"
End If