ToggleCheckBoxField
Form fields, viewer interaction
Description
Selects the exact checkbox or radio widget appearance state, or clears an active state when the button flags permit that operation. The on-state resolves from the first non-Off appearance name of the widget kids and falls back to Yes; a radio field whose flags include $4000 is never cleared, so the call returns 1 without changing the value; on a successful write the field pages are invalidated and
OnFormFieldValueChanged fires
Syntax
Delphi
Function TPDFlibViewer.ToggleCheckBoxField(FieldIndex: Integer): Integer;Parameters
| FieldIndex | 1-based field or widget temporary index of a checkbox or radio field |
|---|
Return values
| 0 | No document is open, the field is not a checkbox or radio button, it is read-only, or the write failed |
|---|---|
| 1 | The state was written, or already satisfied as with the radio flag that prevents clearing |
See also
SetFormFieldValueAndRefresh, OnFormFieldValueChanged, OnFormFieldAction, TPDFlibViewer