MobileToolbarButton.Constructor(buttonType As MobileToolbarButton.Types, buttonCaption As String = "", buttonIcon As Picture = Nil)

From Xojo Documentation

Revision as of 22:15, 3 December 2020 by PLefebvre (talk | contribs) (Sample Code: Added more sample code)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Constructor

MobileToolbarButton.Constructor(buttonType As Types, buttonCaption As String = "", buttonIcon As Picture = Nil)

Creates a button with the specified type, caption or icon.

Sample Code

Adds the camera icon as a toolbar button:

Var tb As New MobileToolbarButton(MobileToolbarButton.Types.Camera)
Self.Toolbar.AddButton(tb)

Add a plain button:

Var saveButton As New MobileToolbarButton(MobileToolbarButton.Types.Plain, "Save")
Self.RightNavigationToolbar.AddButton(saveButton)

Add a button using a system image:

Var moonButton As New MobileToolbarButton(MobileToolbarButton.Types.Plain, "", _
Picture.SystemImage("moon", 0))
Self.RightNavigationToolbar.AddButton(moonButton)