RadioButtonOptionField
概述
RadioButtonOptionField 是 Aspose.PDF FOSS 中用于 .NET 的类。继承自:RadioButtonField。
一个 RadioButtonField 的选项。
此类提供 39 个方法,用于在 .NET 程序中处理 RadioButtonOptionField 对象。可用的方法包括:Accept、Add、AddOption、ChangeAfterResize、ChoiceField、Clone、CopyTo、DeleteOption、ExecuteFieldJavaScript、ExportToJson、ExportValueToJson、Field,以及另外 13 个方法。安装 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Action、Actions、ActiveState、Alignment、AlternateName、AnnotationFlags,以及另外 91 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
DefaultAppearance | DefaultAppearance | 读取 | 默认外观设置(/DA)已应用于该选项的小部件。 |
Caption | Aspose.Pdf.Text.TextFragment? | 读写 | 在单选图标旁显示的标题文本。 |
OptionName | string? | 读写 | 当添加此选项时,/Opt 名称会写入父字段。 |
Style | BoxStyle | 读写 | 单选图标的视觉样式。 |
Width | double | 读写 | 选项部件矩形的宽度(以点为单位)。 |
Height | double | 读写 | 选项小部件矩形的高度(以点为单位)。 |
Border | Border? | 读写 | 应用于选项小部件的边框样式。 |
Characteristics | Aspose.Pdf.Annotations.Characteristics | 读取 | 应用于选项小部件的视觉特征字典(/MK)。 |
Rect | Rectangle? | 读取 | 选项的小部件矩形。 |
NoToggleToOff | bool | 读写 | /Ff 位 15 (NoToggleToOff):当为 true 时,用户无法通过再次点击来清除已选中的单选按钮。 |
Shape | BoxShape | 读写 | 单选按钮小部件的外部边框形状。 |
PageIndex | int | 读取 | 基于 1 的页面索引,指字段的第一个小部件。 |
Options | OptionCollection | 读取 | 单选按钮选项集合. |
IsRadio | bool | 读取 | 这是否是 radio button(对于 RadioButtonField 始终为真)。 |
IsPushbutton | bool | 读取 | 这是否是 pushbutton(对于 RadioButtonField 始终为假)。 |
SelectedValue | string? | 读取 | 当前选中的值,如果没有选中则为 null。 |
Selected | int | 读写 | 获取或设置在 kid widget /AP/N 外观状态中所选单选按钮选项的基于 1 的索引(不包括通用的 “Off” 状态)。 |
Value | string? | 读写 | 覆盖 Value。 |
IsCombo | bool | 读取 | 获取 is combo。 |
IsEditable | bool | 读取 | 获取是否可编辑。 |
IsMultiSelect | bool | 读取 | 获取是否为多选。 |
IsSorted | bool | 读取 | 获取是否已排序。 |
MultiSelect | bool | 读写 | 获取/设置 MultiSelect (/Ff bit 22 — 0-based 21)。 |
CommitImmediately | bool | 读写 | 获取/设置 CommitOnSelChange (/Ff bit 27 — 0-based 26). |
SelectedItems | int[] | 读写 | 基于0的已选选项索引(public-API shape int[] sibling of SelectedIndices; setter 从匹配的选项重写 /V)。 |
SelectedValues | IReadOnlyList<string> | 读写 | 当前选定的值。 |
SelectedIndices | IReadOnlyList<int> | 读取 | Options 列表中所选值的 0 基索引。 |
Type | FieldType | 读取 | 字段类型。 |
FullName | string? | 读取 | 完全限定的字段名称。 |
TextHorizontalAlignment | Aspose.Pdf.HorizontalAlignment | 读写 | 对字段小部件外观应用的文本特定水平对齐覆盖。 |
PartialName | string? | 读写 | 部分字段名称 (/T)。 |
NormalAppearance | XForm? | 读取 | 该字段的 “Normal” 外观(/AP /N 条目)。 |
Appearance | Aspose.Pdf.Annotations.AppearanceDictionary | 读取 | 该字段小部件的外观流(/AP 条目),以外观名称为键。 |
OnActivated | Annotations.PdfAction? | 读写 | 当此字段被激活时触发的动作(/A 条目)。 |
Count | int | 读取 | 此字段的 /Kids 数组中的子项数量 — 可以是子字段(层级节点)或小部件注释(具有多个可视小部件的终端字段,例如分组的复选框/单选框)。 |
Fields | Field[] | 读取 | 此字段的字段类型子项作为快照数组 — 便捷访问器,映射表单上的 Fields。 |
DefaultValue | string? | 读取 | 默认值(/DV)。 |
AlternateName | string? | 读写 | 备用字段名称 / 工具提示 (/TU 条目)。 |
Flags | Aspose.Pdf.Annotations.AnnotationFlags | 读写 | 小部件注释标志 (/F 条目),例如。 |
TabOrder | int | 读写 | 此字段的 Tab 顺序索引。 |
IsReadOnly | bool | 读取 | 字段是否为只读。 |
ReadOnly | bool | 读写 | 字段是否为只读(可设置的 API 奇偶校验别名)。 |
IsRequired | bool | 读取 | 字段是否必填。 |
Color | Color | 读写 | 字段颜色(存储在 /DA 默认外观字符串中,使用 RGB)。 |
AnnotationIndex | int | 读写 | 该字段小部件在其页面的 /Annots 数组中的基于 1 的标签位置——数组顺序即页面的标签顺序。 |
FitIntoRectangle | bool | 读写 | 全局标志:当为 true 时,字段的值会自动调整大小以适应其 widget rectangle。 |
IsGroup | bool | 读取 | 此字段是否为子字段的 container/group。 |
IsSharedField | bool | 读写 | 此字段是否属于 shared-fields 组。 |
IsSynchronized | bool | 读取 | 集合是否线程安全。 |
SyncRoot | object | 读取 | 同步根;返回此实例。 |
MaxFontSize | double | 读写 | 字段外观自动适配使用的最大字体大小。 |
MinFontSize | double | 读写 | 字段外观自动适配使用的最小字体大小。 |
MappingName | string? | 读写 | 外部脚本用于识别字段的映射名称。 |
AnnotationType | AnnotationType | 读取 | 始终为 Widget。 |
Actions | AnnotationActionCollection | 读取 | 小部件的 /AA 树的操作槽。 |
Exportable | bool | 读写 | 是否在表单提交时导出小部件的值。 |
Highlighting | HighlightingMode | 读写 | 当用户点击小部件时使用的可视高亮模式(/H 条目)。 |
Parent | Forms.Field? | 读取 | 当此小部件是 AcroForm 字段的可视子字段时的父字段。 |
Required | bool | 读写 | 在提交之前是否必须填写该小部件(/Ff 位 2)。 |
HighlightMode | string | 读取 | 高亮模式 (/H 条目)。 |
DefaultAppearanceString | string? | 读取 | 默认外观字符串 (/DA 条目)。 |
FieldValue | string? | 读取 | 字段值 (/V 条目)。 |
DefaultFieldValue | string? | 读取 | 默认字段值(/DV 条目)。 |
FieldType | string? | 读取 | 字段类型(/FT 条目)。 |
InnerRect | Rectangle? | 读取 | 注释矩形通过 /RD(矩形差异)条目进行内缩——即实际在 Rect 内绘制的区域。 |
ActiveState | string? | 读写 | 当前活动的外观状态(/AS 条目)。 |
Alignment | TextAlignment | 读写 | 文本对齐(用于携带富文本的自由文本/小部件注释)。 |
HorizontalAlignment | Aspose.Pdf.HorizontalAlignment | 读写 | 水平对齐(除了 Alignment 之外另行公开;两者可独立设置)。 |
States | AppearanceDictionary | 读取 | 外观状态字典(AP/N 的每个状态子字典,例如. |
UpdateAppearanceOnConvert | bool | 读写 | 在注释保存到转换后的文档时,是否重新生成外观流。 |
UseFontSubset | bool | 读写 | 是否应对嵌入的字体(如果有)进行子集化。 |
Contents | string? | 读写 | 注释内容(文本)。 |
Opacity | double | 读写 | 注释不透明度(0.0 = 透明,1.0 = 不透明)。 |
InteriorColor | Color? | 读写 | 注释内部颜色(/IC 条目,适用于圆形/方形/线条注释)。 |
Title | string? | 读写 | 注释标题(标记注释的作者)。 |
Name | string? | 读写 | 注释名称(唯一标识符 — /NM 条目)。 |
Subject | string? | 读写 | 注释主题(/Subj 条目)。 |
ModifiedDate | string? | 读取 | 修改日期。 |
Modified | DateTime | 读写 | /M(已修改)日期,以键入的 DateTime 形式。 |
AnnotationFlags | AnnotationFlags | 读写 | 匹配公共表面的 Flags 类型别名,将 AnnotationFlags 作为属性公开。 |
Action | PdfAction? | 读写 | 与此注释关联的操作(/A 条目)。 |
Author | string? | 读取 | 注释作者(/T 条目)。 |
AnnotationState | string? | 读取 | 注释状态(/State 条目),例如。 |
AnnotationStateModel | string? | 读取 | 注释状态模型(/StateModel 条目),例如。 |
ReplyType | string? | 读取 | 回复类型(/RT 条目),例如. |
InReplyTo | Annotation? | 读写 | 此回复对应的注释(/IRT 条目)。 |
QuadPoints | Point[] | 读写 | QuadPoints 作为 Point 值的数组。 |
Page | Page? | 读取 | 拥有此注释的页面,若无法解析则为 null(例如. |
VerticalAlignment | VerticalAlignment | 读写 | 对该段落应用的垂直对齐。 |
Margin | MarginInfo | 读写 | 对该段落应用的外边距信息。 |
IsFirstParagraphInColumn | bool | 读写 | 强制段落在新列开始。 |
IsKeptWithNext | bool | 读写 | 保持此段落与下一段落在同一页。 |
IsInNewPage | bool | 读写 | 强制段落在新页面开始。 |
IsInLineParagraph | bool | 读写 | 内联段落标志(不另起新行)。 |
HyperlinkText | string? | 读写 | 旧版字符串类型的超链接目标。 |
Hyperlink | Hyperlink? | 读写 | 已对段落应用了已键入的超链接装饰。 |
ZIndex | int | 读写 | DOM 渲染器使用的 Z 顺序索引。 |
方法
| 签名 | 描述 |
|---|---|
RadioButtonOptionField() | 在此 RadioButtonOptionField 实例上调用 RadioButtonOptionField。 |
RadioButtonOptionField(page: Page, rect: Rectangle) | 在此 RadioButtonOptionField 实例上调用 RadioButtonOptionField(page, rect)。 |
RadioButtonField(page: Page) | 创建一个绑定到提供的页面阅读器的新单选按钮字段。 |
RadioButtonField(page: Page, rect: Rectangle) | 使用字段级别的 /Rect 设置进行构造。 |
RadioButtonField(doc: Document) | 在此 RadioButtonOptionField 实例上调用 RadioButtonField(doc)。 |
AddOption(optionName: string, rect: Rectangle) | 在提供的矩形区域添加一个具有给定外观状态名称的选项。 |
AddOption(optionName: string) | 仅按名称添加单选项;遮蔽继承的 ChoiceField 版本,使反射在此类型上呈现它。 |
Add(option: RadioButtonOptionField) | 将已配置的 RadioButtonOptionField 作为此单选组的子部件添加。 |
SetPosition(point: Aspose.Pdf.Point) | 将字段的部件矩形移动到 point,保留当前的宽度/高度。 |
ChoiceField(doc: Document) | 在此 RadioButtonOptionField 实例上调用 ChoiceField(doc)。 |
ChoiceField(doc: Document, rect: Rectangle) | 在此 RadioButtonOptionField 实例上调用 ChoiceField(doc, rect)。 |
ChoiceField(page: Page, rect: Rectangle) | 在此 RadioButtonOptionField 实例上调用 ChoiceField(page, rect)。 |
AddOption(export: string, name: string) | 添加一个选项,分别指定导出值和显示值。 |
DeleteOption(optionName: string) | 删除第一个匹配 optionName 的选项(可以是纯粹的 PdfString,或是 [export, name] 对中的显示部分)。 |
Field(doc: Document) | 创建一个与文档绑定的字段。 |
GetEnumerator() | 遍历此字段在 /Kids 数组中的子项的 widget 注释。 |
CopyTo(array: Aspose.Pdf.Annotations.WidgetAnnotation[], index: int) | 将 widget 注释复制到数组中,从指定索引开始。 |
CopyTo(array: Field[], index: int) | 将此字段的子项(作为 Field 实例)复制到数组中,从指定索引开始。 |
ExecuteFieldJavaScript(javaScriptAction: Aspose.Pdf.Annotations.JavascriptAction) | 对该字段执行提供的 JavaScript 操作。 |
ExportToJson(stream: Stream) | 将此字段序列化为 JSON(单个 FieldExportingData 对象),通过提供的流。 |
ExportToJson(fileName: string) | 将此字段序列化为 JSON 文件。 |
ExportToJson(stream: Stream, options: ExportFieldsToJsonOptions?) | 将此字段序列化为 JSON,通过提供的流。 |
ExportToJson(fileName: string, options: ExportFieldsToJsonOptions?) | 将此字段序列化为 JSON 文件。 |
ExportValueToJson(outputJsonStream: Stream, indented: bool) | 将字段的名称、标志和数值写入 JSON 流。 |
Flatten() | 将此字段扁平化——把其数值转换为静态页面内容。 |
GetWidgetEnumerator() | 枚举器的类型为 WidgetAnnotation。 |
ImportValueFromJson(inputJsonStream: Stream) | 从 JSON 流读取此字段的数值。 |
ImportValueFromJson(inputJsonStream: Stream, fieldFullNameInJSON: string) | 从 JSON 流中读取具名字段的值——单个字段对象(可能通过 ChildFields 嵌套)或它们的数组——并将点路径匹配 fieldFullNameInJSON 的条目的值应用。 |
Recalculate() | 根据其计算脚本重新计算字段的值。 |
WidgetAnnotation(doc: Document) | 编程 ctor — 创建一个与文档读取器关联的裸 widget 注释。 |
ExportToJson(stream: System.IO.Stream) | 将此 widget 的字段以 JSON 形式序列化到流中。 |
ExportToJson(stream: System.IO.Stream, options: ExportFieldsToJsonOptions?) | 将此小部件的字段序列化为单个 FieldExportingData JSON 对象并写入流。 |
GetCheckedStateName() | 返回表示此小部件“on” / “checked”状态(通常为“Yes”)的外观状态名称,该名称从 /AP/N 字典的键中查找(任何不是 “Off” 的键)。 |
Accept(visitor: AnnotationSelector) | 对该 RadioButtonOptionField 实例调用 Accept(visitor)。 |
GetRectangle(considerRotation: bool) | 通过 considerRotation 调整后的边界矩形。 |
ChangeAfterResize(transform: Matrix) | 在用户调整页面或宿主矩形大小后,调整注释的几何形状。 |
UpdateAppearances() | 根据注释当前的几何形状和颜色重新生成普通外观流 (/AP /N)。 |
WriteXfdf(writer: System.Xml.XmlWriter) | 将此注释序列化为 XFDF 元素写入 writer (PDF 32000 §12.7.8 / XFDF 3.0)。 |
Clone() | 浅克隆 — 复制标量/引用共享状态。 |