跳到主要内容

ClearFormat

清除字段的格式。

语法

expression.ClearFormat();

expression - 表示 ApiComboboxField 类的变量。

参数

此方法没有任何参数。

返回值

boolean

示例

此示例获取文本字段并为其设置数字格式,然后清除格式。

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

comboboxField.SetNumberFormat(0, "us", "black-minus", "$", true);
comboboxField.SetValue('-1000');
comboboxField.ClearFormat();