Skip to main content

GetClassType

Returns a type of the ApiButtonWidget class.

Syntax

expression.GetClassType();

expression - A variable that represents a ApiButtonWidget class.

Parameters

This method doesn't have any parameters.

Returns

"buttonWidget"

Example

Retrieve the class type of a button widget in a PDF document.

// How to identify the class type of a button widget in a PDF document?

// Obtain the class type identifier of a button widget object in a PDF document.

let doc = Api.GetDocument();
let page = doc.GetPage(0);
let buttonField = Api.CreateImageField([10, 10, 25, 25]);
page.AddObject(buttonField);

let widgets = buttonField.GetAllWidgets();
console.log('Widget type is: ' + widgets[0].GetClassType());