Skip to main content
Version: v3

hmUI.deleteWidget(widget)

Delete the UI widget.

Type

(widget: WIDGET) => void

Parameters

WIDGET

DescriptionType
widget object, returned by hmUI.createWidgetnumber

Code examples

Page({
build() {
const img = hmUI.createWidget(hmUI.widget.IMG, {
x: 125,
y: 125,
src: 'zeppos.png'
})

hmUI.deleteWidget(img)
}
})