WebButton

From Xojo Documentation

Revision as of 23:14, 16 February 2022 by Gperlman (talk | contribs) (See Also)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

Events
Closed MenuSelected Shown
ContextualMenuSelected Opening
Hidden Pressed
Properties
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
Methods
Close GotoURL SetFocus
ExecuteJavaScript Press UpdateBrowser

Notes

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"
Else
Button1.Caption = "Start"
End If

See Also

WebSegmentedButton, WebToolbar classes; UserGuide:Web Button topic