Skip to main content

SetPercentageFormat

Sets percentage format for field.

Syntax

expression.SetPercentageFormat(nDemical, sSepStyle);

expression - A variable that represents a ApiComboboxField class.

Parameters

NameRequired/OptionalData typeDefaultDescription
nDemicalRequirednumbernumber of decimals
sSepStyleRequiredNumberSepStylenumber separate style

Returns

boolean

Example

Get text field and set percentage format for it.

// How to set percentage format for a combobox field?

// Set percentage format and display the result in a PDF document.

let doc = Api.GetDocument();
let page = doc.GetPage(0);
let comboboxField = Api.CreateComboboxField([10, 10, 160, 30]);
page.AddObject(comboboxField);

comboboxField.SetPercentageFormat(0, "us");
comboboxField.SetValue(10);