THPDFHeadlessDocument.SetChoiceFieldValuesWithAppearance

procedure SetChoiceFieldValuesWithAppearance(FieldIndex: Integer;
  const SelectedValues: array of UnicodeString;
  const TrueTypeFont: SysUtils.TBytes;
  const Options: THPDFHeadlessTextAppearanceOptions);

Updates a writable Ch field and regenerates every widget appearance in one atomic operation

Multiple-selection list boxes store an actual Unicode string array in V and matching ascending option indices in I, ordered by the source Opt entries regardless of the caller's order

An empty input stores empty V and I arrays for multiple-selection fields; a single-selection field stores a string V and accepts at most one input value

Option export/display pairs, inherited Opt and inherited TI are resolved with cycle and depth checks; visible display labels retain their order, and every visible selected row receives a blue background

Selections above TI remain in V and I whilst their rows stay outside the displayed list; editable combo boxes accept a custom string with an empty I array

Duplicate input values, ambiguous matching export options, nonstring labels, unknown noneditable values and contradictory combo/multiple flags are rejected before any value or appearance is published

Read-only fields, AES form-filling permissions, resource budgets and cancellation apply; failure preserves the original V, I, appearance links and generated object graph

Changes to signed or certified documents still require a separate signature-aware form policy

Read the complete array with GetChoiceFieldValues; the scalar Value member in THPDFHeadlessFormField does not represent a multiple-selection array