Delete
Removes widget from parent field.
Inherited from ApiBaseWidget.Delete.
Example
Remove a form field widget from a PDF.
// How do I delete a widget from a form field in a PDF?
// Unlink a widget instance from its parent form field in a PDF.
let doc = Api.GetDocument();
let page = doc.GetPage(0);
let textField = Api.CreateTextField([10, 10, 160, 30]);
page.AddObject(textField);
textField.SetValue('Example text');
textField.AddWidget(0, [10, 40, 160, 60]);
let widgets = textField.GetAllWidgets();
widgets[0].Delete();