Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created January 3, 2022 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/90f8ccd7764e23c7fe6a3eb06c534ee4 to your computer and use it in GitHub Desktop.
Save bjoerntx/90f8ccd7764e23c7fe6a3eb06c534ee4 to your computer and use it in GitHub Desktop.
private void FlattenFormFields(TextControl textControl) {
int fieldCount = textControl1.FormFields.Count;
for (int i = 0; i < fieldCount; i++) {
TextFieldCollectionBase.TextFieldEnumerator fieldEnum =
textControl1.FormFields.GetEnumerator();
fieldEnum.MoveNext();
FormField curField = (FormField)fieldEnum.Current;
textControl1.FormFields.Remove(curField, true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment