From Xojo Documentation

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

Class (inherits from WebUIControl)

New in 2020r1

The standard button used for web apps.

Closed MenuSelected Shown
ContextualMenuSelected Opening
Hidden Pressed
AllowAutoDisable Left Parent fa-lock-32.png
Cancel LockBottom fa-lock-32.png Style
Caption LockHorizontal fa-lock-32.png TabIndex
ContextualMenu LockLeft fa-lock-32.png Tooltip
ControlID fa-lock-32.png LockRight fa-lock-32.png Top
Default LockVertical fa-lock-32.png Visible
Enabled Menu Width
Height Name fa-lock-32.png
Indicator Page fa-lock-32.png
Close GotoURL SetFocus
ExecuteJavaScript Press UpdateBrowser


When the button is pressed or the Press method is called, the Pressed event is called.

The Default and Cancel properties can only be set to True for a single button each per page at any given moment. When either of these properties is True, the Indicator property is ignored as Default and Cancel buttons have a default indicator.

Sample Code

This code changes the Caption of a button between Start/Stop when you click it:

If Button1.Caption = "Start" Then
Button1.Caption = "Stop"
Button1.Caption = "Start"
End If

See Also

WebSegmentedButton, WebToolbar classes; UserGuide:Web Button topic