Class: Toybox.WatchUi.IconMenuItem

Overview

A representation of an icon item in a Menu2.

An IconMenuItem is a element of a Menu2 View that represents one of the options in the menu. An IconMenuItem has an icon displayed on the left or right of the menu item labels.

An IconMenuItem can be added to a Menu2 using the addItem() method.

See Also:

Since:

API Level 3.0.0

Supported Devices:

Instance Method Summary collapse

Instance Method Details

getIcon() as Graphics.BitmapType or WatchUi.Drawable or Null

Get IconMenuItem icon.

Returns:

Since:

API Level 3.0.0

initialize(label as Lang.String or Lang.Symbol, subLabel as Lang.String or Lang.Symbol or Null, identifier, icon as Graphics.BitmapType or WatchUi.Drawable, options as { :alignment as MenuItem.Alignment } or Null)

Constructor

Parameters:

Since:

API Level 3.0.0

setIcon(icon as Graphics.BitmapType or WatchUi.Drawable) as Void

Set the IconMenuItem icon.

Parameters:

Since:

API Level 3.0.0

Throws:


Generated Mar 18, 2024 2:40:15 PM