SetFieldAttribute

FormEditor.SetFieldAttribute method

设置字段属性。

public bool SetFieldAttribute(string fieldName, PropertyFlag flag)
范围类型描述
fieldNameString应设置属性的字段名称。
flagPropertyFlag标志(NoExport/ReadOnly/必需)

返回值

如果属性设置成功,则为 true。

例子

FormEditor formEditor = new FormEditor("PdfForm.pdf",  "PdfForm_SetFieldAttribute.pdf");
formEditor.SetFieldAttribute("listboxField", PropertyFlag.ReadOnly);
formEditor.SetFieldAttribute("textField", PropertyFlag.NoExport);

也可以看看