FormEditor.AddListItem

AddListItem(string, string)

Ajoute un nouvel élément à la boîte de liste.

public void AddListItem(string fieldName, string itemName)
ParamètreTypeDescription
fieldNameStringNom du champ auquel le nouvel élément sera ajouté.
itemNameStringNom du nouvel élément.

Exemples

FormEditor formEditor = new FormEditor("PdfForm.pdf", PdfForm_out.pdf");
formEditor.AddListItem("listBoxField", "Item 4 (New Item)");

Voir aussi


AddListItem(string, string[])

Ajoute un nouvel élément avec une valeur d’exportation au champ de boîte de liste existant, uniquement pour le champ de boîte combinée AcroForm.

public void AddListItem(string fieldName, string[] exportName)
ParamètreTypeDescription
fieldNameStringNom du champ auquel les éléments seront ajoutés.
exportNameString[]Un tableau de chaînes désignant un nouvel élément de liste avec une valeur d’exportation, c’est-à-dire (Étiquette de l’élément, Valeur d’exportation).

Exemples

FormEditor fe = new FormEditor("PdfForm.pdf", "FormEditor_AddListItem2.pdf");
fe.AddListItem("listboxField", new string[] { "4", "Item4(Added)" });

Voir aussi