Skip to main content

deleteWidget

Type​

message

Summary​

Sent to a widget just before it is removed from the stack.

Syntax​

deleteWidget

Description​

Handle the deleteWidget message if you want to perform cleanup before a widget is removed from the stack.

The actual deletion is not triggered by the deleteWidget message, so trapping the message and not allowing it to pass does not prevent the widget from being removed.

However, the undo command will restore a widget after it is deleted by the user.

Examples​

on deleteWidget
-- Save the state by storing value in the stack
dispatch "saveWidgetState" to this stack \
with "the name of me,the cStateValue of me"
end deleteWidget

command: undo

glossary: command, message, pass, trap

object: stack, widget

Compatibility and Support​

Introduced

LiveCode 8.0

OS

mac

windows

linux

ios

android

web

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?