RadioButtonOptionField

RadioButtonOptionField

Overview

RadioButtonOptionField is a class in Aspose.PDF FOSS for .NET. Inherits from: RadioButtonField.

One option of a RadioButtonField.

This class declares 40 methods for RadioButtonOptionField objects in .NET programs. Available methods include: Accept, Add, AddOption, BaseParagraph, ChangeAfterResize, ChoiceField, Clone, CopyTo, DeleteOption, ExecuteFieldJavaScript, ExportToJson, ExportValueToJson, and 14 additional methods. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Action, Actions, ActiveState, Alignment, AlternateName, AnnotationFlags, and 91 more.

Properties

NameTypeAccessDescription
DefaultAppearanceDefaultAppearanceReadDefault-appearance settings (/DA) applied to the option’s widget.
CaptionAspose.Pdf.Text.TextFragment?Read/WriteCaption text shown next to the radio glyph.
OptionNamestring?Read/WriteThe /Opt name written into the parent field when this option is added.
StyleBoxStyleRead/WriteVisual style of the radio glyph.
WidthdoubleRead/WriteWidth of the option’s widget rectangle in points.
HeightdoubleRead/WriteHeight of the option’s widget rectangle in points.
BorderBorder?Read/WriteBorder styling applied to the option’s widget.
CharacteristicsAspose.Pdf.Annotations.CharacteristicsReadVisual-characteristics dictionary (/MK) applied to the option’s widget.
RectRectangle?ReadThe option’s widget rectangle.
NoToggleToOffboolRead/Write/Ff bit 15 (NoToggleToOff): when true the user can’t clear the selected radio button by clicking it again.
ShapeBoxShapeRead/WriteOuter border shape of the radio-button widgets.
PageIndexintRead1-based page index of the field’s first widget.
OptionsOptionCollectionReadThe radio-button option collection.
IsRadioboolReadWhether this is a radio button (always true for RadioButtonField).
IsPushbuttonboolReadWhether this is a pushbutton (always false for RadioButtonField).
SelectedValuestring?ReadCurrently selected value, or null if nothing is selected.
SelectedintRead/WriteGets or sets the 1-based index of the selected radio button option among the kid widget /AP/N appearance states (excluding the universal “Off” state).
Valuestring?Read/WriteOverride of Value: the appearance-state name of the selected button, as /V carries it.
SelectedIndicesIReadOnlyList<int>ReadThe selected button’s position, as the option list counts them; the base lookup by export value would miss a state that /Opt names differently.
IsComboboolReadGets the is combo.
IsEditableboolReadGets the is editable.
IsMultiSelectboolReadGets the is multi select.
IsSortedboolReadGets the is sorted.
MultiSelectboolRead/WriteGet/set MultiSelect (/Ff bit 22 — 0-based 21).
CommitImmediatelyboolRead/WriteGet/set CommitOnSelChange (/Ff bit 27 — 0-based 26).
SelectedItemsint[]Read/WriteSelected-option indices, 1-based like Index, Options and Selected — SelectedItems = [1, 3] selects the first and third options and reads back as [1, 3].
SelectedValuesIReadOnlyList<string>Read/WriteThe currently selected values.
TypeFieldTypeReadThe field type.
FullNamestring?ReadThe fully qualified field name.
TextHorizontalAlignmentAspose.Pdf.HorizontalAlignmentRead/WriteText-specific horizontal alignment override applied to the field’s widget appearance.
PartialNamestring?Read/WriteThe partial field name (/T).
NormalAppearanceXForm?ReadThe field’s “Normal” appearance (the /AP /N entry).
AppearanceAspose.Pdf.Annotations.AppearanceDictionaryReadThe field widget’s appearance streams (the /AP entry), keyed by appearance name.
OnActivatedAnnotations.PdfAction?Read/WriteThe action triggered when this field is activated (/A entry).
CountintReadNumber of kids in this field’s /Kids array — either child fields (hierarchy nodes) or widget annotations (a terminal field with multiple visual widgets, such as a grouped checkbox/radio).
FieldsField[]ReadField-typed child kids of this field as a snapshot array — convenience accessor mirroring Fields on the form.
DefaultValuestring?ReadThe default value (/DV).
AlternateNamestring?Read/WriteThe alternate field name / tooltip (/TU entry).
FlagsAspose.Pdf.Annotations.AnnotationFlagsRead/WriteThe widget annotation flags (/F entry), e.g.
TabOrderintRead/WriteTab order index for this field.
IsReadOnlyboolReadWhether the field is read-only.
ReadOnlyboolRead/WriteWhether the field is read-only (settable alias for API compatibility).
IsRequiredboolReadWhether the field is required.
ColorColorRead/WriteThe field color (stored in /DA default appearance string as RGB).
AnnotationIndexintRead/Write1-based tab position of this field’s widget within its page’s /Annots array — the array order is the page tab order.
FitIntoRectangleboolRead/WriteGlobal flag: when true, a field’s value is auto-resized to fit its widget rectangle.
IsSynchronizedboolReadWhether the collection is thread-safe.
SyncRootobjectReadSynchronization root; returns this instance.
MaxFontSizedoubleRead/WriteMaximum font size used by the field’s appearance auto-fit.
MinFontSizedoubleRead/WriteMinimum font size used by the field’s appearance auto-fit.
MappingNamestring?Read/WriteMapping name used by external scripts to identify the field.
IsGroupboolReadWhether this field is a container/group of child fields.
IsSharedFieldboolRead/WriteWhether this field belongs to a shared-fields group.
AnnotationTypeAnnotationTypeReadAlways Widget.
ActionsAnnotationActionCollectionReadAction slots for the widget’s /AA tree.
ExportableboolRead/WriteWhether the widget’s value should be exported on form submit.
HighlightingHighlightingModeRead/WriteVisual highlighting mode used when the user clicks the widget (/H entry).
ParentForms.Field?ReadParent Field when this widget is the visual child of an AcroForm field.
RequiredboolRead/WriteWhether the widget must be filled before submit (/Ff bit 2).
HighlightModestringReadThe highlight mode (/H entry).
DefaultAppearanceStringstring?ReadThe default appearance string (/DA entry).
FieldValuestring?ReadThe field value (/V entry).
DefaultFieldValuestring?ReadThe default field value (/DV entry).
FieldTypestring?ReadThe field type (/FT entry).
InnerRectRectangle?ReadThe annotation rectangle inset by the /RD (rectangle differences) entry — the region actually drawn inside Rect.
ActiveStatestring?Read/WriteCurrently-active appearance state (/AS entry).
AlignmentTextAlignmentRead/WriteText alignment (for free-text / widget annotations carrying rich text).
HorizontalAlignmentAspose.Pdf.HorizontalAlignmentRead/WriteHorizontal alignment (exposed in addition to Alignment; the two are independently settable).
StatesAppearanceDictionaryReadAppearance-state dictionary (the per-state sub-dict of AP/N, e.g.
Contentsstring?Read/WriteThe annotation contents (text).
OpacitydoubleRead/WriteAnnotation opacity (0.0 = transparent, 1.0 = opaque).
InteriorColorColor?Read/WriteThe annotation interior color (/IC entry, for circle/square/line annotations).
Titlestring?Read/WriteThe annotation title (author for markup annotations).
Namestring?Read/WriteThe annotation name (unique identifier — the /NM entry).
Subjectstring?Read/WriteThe annotation subject (/Subj entry).
ModifiedDatestring?ReadThe modification date.
ModifiedDateTimeRead/WriteThe /M (modified) date as a typed DateTime.
AnnotationFlagsAnnotationFlagsRead/WriteTyped alias of Flags matching the public surface that exposes AnnotationFlags as a property.
ActionPdfAction?Read/WriteThe action associated with this annotation (/A entry).
Authorstring?ReadThe annotation author (/T entry).
AnnotationStatestring?ReadThe annotation state (/State entry), e.g.
AnnotationStateModelstring?ReadThe annotation state model (/StateModel entry), e.g.
ReplyTypestring?ReadThe reply type (/RT entry), e.g.
InReplyToAnnotation?Read/WriteThe annotation this one is replying to (/IRT entry).
QuadPointsPoint[]Read/WriteQuadPoints as an array of Point values.
PagePage?ReadThe page that owns this annotation, or null when it can’t be resolved (e.g.
UpdateAppearanceOnConvertboolRead/WriteWhether to regenerate the appearance stream when an annotation is saved into a converted document.
UseFontSubsetboolRead/WriteWhether the embedded font (if any) should be subsetted.
VerticalAlignmentVerticalAlignmentRead/WriteVertical alignment applied to this paragraph.
MarginMarginInfoRead/WriteOuter-margin info applied to this paragraph.
IsFirstParagraphInColumnboolRead/WriteForce the paragraph to start a new column.
IsKeptWithNextboolRead/WriteKeep this paragraph on the same page as the next one.
IsInNewPageboolRead/WriteForce the paragraph to start on a new page.
IsInLineParagraphboolRead/WriteInline paragraph flag (does not start a new line).
HyperlinkTextstring?Read/WriteLegacy string-typed hyperlink target.
HyperlinkHyperlink?Read/WriteTyped hyperlink decoration applied to the paragraph.
ZIndexintRead/WriteZ-order index used by the DOM renderer.

Methods

SignatureDescription
RadioButtonOptionField()Creates an option with no rectangle; its Width and Height size the widget when it is added to a radio group.
RadioButtonOptionField(page: Page, rect: Rectangle)Creates an option whose widget is placed at the given rectangle when it is added to a radio group.
RadioButtonField(page: Page)Creates a new radio-button field bound to the supplied page’s reader.
RadioButtonField(page: Page, rect: Rectangle)Construct with the field-level /Rect set.
RadioButtonField(doc: Document)Creates an empty radio-button group for the given document.
AddOption(optionName: string, rect: Rectangle)Adds an option with the given appearance-state name at the supplied rectangle.
AddOption(optionName: string)Add a radio option by name only; shadows the inherited ChoiceField version so reflection surfaces it on this type.
Add(option: RadioButtonOptionField)Add a configured RadioButtonOptionField as a kid widget of this radio group.
SetPosition(point: Aspose.Pdf.Point)Move the field’s widget rectangle to point, preserving the current width/height.
ChoiceField(doc: Document)Calls ChoiceField(doc) on this RadioButtonOptionField instance.
ChoiceField(doc: Document, rect: Rectangle)Creates a push-button field for the given document with its widget at the given rectangle.
ChoiceField(page: Page, rect: Rectangle)Creates a push-button field for the page’s document with its widget at the given rectangle.
AddOption(export: string, name: string)Add an option with separate export and display values.
DeleteOption(optionName: string)Remove the first option matching optionName (either as a bare PdfString or as the display half of an [export, name] pair).
Field(doc: Document)Create a field bound to a document.
ExecuteFieldJavaScript(javaScriptAction: Aspose.Pdf.Annotations.JavascriptAction)Execute the supplied JavaScript action against this field.
Flatten()Flatten this field — turn its value into static page content.
Recalculate()Recalculate the field’s value from its calculation script.
ExportToJson(stream: Stream)Serialise this field to JSON (a single FieldExportingData object) via the supplied stream.
ExportToJson(fileName: string)Serialise this field to a JSON file.
ExportToJson(stream: Stream, options: ExportFieldsToJsonOptions?)Serialise this field to JSON via the supplied stream.
ExportToJson(fileName: string, options: ExportFieldsToJsonOptions?)Serialise this field to a JSON file.
ExportValueToJson(outputJsonStream: Stream, indented: bool)Write the field’s name, flags and value to a JSON stream.
ImportValueFromJson(inputJsonStream: Stream)Read this field’s value from a JSON stream.
ImportValueFromJson(inputJsonStream: Stream, fieldFullNameInJSON: string)Read a named field’s value from a JSON stream — a single field object (possibly nested via ChildFields) or an array of them — and apply the value of the entry whose dotted path matches fieldFullNameInJSON.
GetEnumerator()Iterates widget annotations for this field’s kids in the /Kids array.
CopyTo(array: Aspose.Pdf.Annotations.WidgetAnnotation[], index: int)Copy widget annotations into an array starting at index.
CopyTo(array: Field[], index: int)Copy this field’s kids (as Field instances) into an array starting at index.
GetWidgetEnumerator()Enumerator typed to WidgetAnnotation.
WidgetAnnotation(doc: Document)Programmatic ctor — creates a bare widget annotation associated with doc’s reader.
ExportToJson(stream: System.IO.Stream)Serialise this widget’s field as JSON to a stream.
ExportToJson(stream: System.IO.Stream, options: ExportFieldsToJsonOptions?)Serialise this widget’s field as a single FieldExportingData JSON object to a stream.
GetCheckedStateName()Returns the appearance state name that represents the “on” / “checked” state of this widget (typically “Yes”), looked up from the /AP/N dict’s keys (anything that isn’t “Off”).
Accept(visitor: AnnotationSelector)Calls Accept(visitor) on this RadioButtonOptionField instance.
GetRectangle(considerRotation: bool)Bounding rectangle adjusted by considerRotation.
ChangeAfterResize(transform: Matrix)Adjust the annotation’s geometry after the user resized the page or the host rectangle.
WriteXfdf(writer: System.Xml.XmlWriter)Serialize this annotation as an XFDF element to writer (PDF 32000 §12.7.8 / XFDF 3.0).
UpdateAppearances()Regenerate the normal appearance stream (/AP /N) from the annotation’s current geometry and colours.
BaseParagraph()Creates a paragraph with default alignment, an empty margin and no hyperlink.
Clone()Shallow clone — copies scalar/ref-shared state.

See Also

 English