# RadioGroupNode
Class Inherits DropdownNode
## About
`RadioGroupNode` represents a semantic radio-button group with an editable legend and individually selectable, editable, and styleable options.
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| Layouts | Vertical <br > Horizontal | (None) |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| ActionItem | index As Integer | ToolbarItem | Returns the contextual toolbar item at the specified index. |
| AddVectorPDFAnnotations | pdf As PDFDocument <br> pageNumber As Integer <br> offsetX As Double <br> offsetY As Double <br> usedNames As Dictionary <br> formAction As String = "" | (None) | Adds this node's interactive annotations and form controls to a vector PDF page. Override for custom nodes. |
| CanImportHTML | element As HTMLSupport.HTMLElement | Boolean | Returns whether this node can import the supplied HTML element. |
| Constructor | (None) | (None) | Creates a new radio group node. |
| Duplicate | (None) | Node | Returns an indepent copy of this node. |
| EditingApplyStyle | start As Integer <br> length As Integer <br> style As TextStyle <br> fieldName As String | (None) | Applies the specified style field to the active radio-group text. |
| EditingClearFormatting | start As Integer <br> length As Integer | (None) | Clears formatting from the active radio-group text. |
| EditingInsertText | position As Integer <br> value As String <br> style As TextStyle | (None) | Inserts text into the active radio-group text. |
| EditingRemoveText | start As Integer <br> length As Integer | (None) | Removes text from the active radio-group text. |
| EditingRestoreState | state As Variant | (None) | Restores the active radio-group text state. |
| EditingState | (None) | Variant | Returns a snapshot of the active radio-group text. |
| ExportStyles | stylesheet As GraffitiProEditor.Stylesheet | (None) | Adds the stylesheet rules this node type's HTML output uses. |
| FromHTML | element As HTMLSupport.HTMLElement | Boolean | Imports a radio input or radiogroup container. |
| FromJSON | data As JSONItem | Boolean | Restores state from JSON. |
| HandlePress | x As Double <br> y As Double | Boolean | Sets the default radio option when the user presses its row. |
| HTMLImportPriority | element As HTMLSupport.HTMLElement | Integer | Returns this node type's priority when resolving an HTML importer. |
| HTMLTags | (None) | String | Returns the HTML tag names supported by this node type. |
| InspectorSections | (None) | InspectorSection | Returns the user-editable inspector sections for the radio group. |
| LocalizeToolbarItem | strings As GraffitiProEditor.Editor | (None) | Sets this node type's toolbar item text from the supplied editor's localization properties. The editor calls it when the type is registered, when the editor opens, and when a locale pack is applied to the editor. A custom node type can override it to localize its own toolbar item. |
| PerformAction | index As Integer <br> selectedItem As DesktopMenuItem | (None) | Handles the contextual toolbar action. |
| PerformToolbarAction | editor As Editor <br> selectedItem As DesktopMenuItem | (None) | Handles activation of the main-toolbar item. |
| PreferredHeight | g As Graphics <br> availableWidth As Double | Double | Returns the preferred height. |
| Render | g As Graphics <br> bounds As Rect <br> selected As Boolean | (None) | Draws the radio group preview. |
| RenderSelectionOverlay | g As Graphics | (None) | Draws the radio group and active legend or option selection overlay. |
| ToHTML | (None) | String | Returns an HTML representation of this content. |
| ToJSON | (None) | JSONItem | Returns the persistent state as JSON. |
| TypeName | (None) | String | Returns the display name. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| ActiveDisabled | Boolean | (None) | Gets or sets whether the active radio option is disabled. |
| ActiveLabel | String | (None) | Gets or sets the active radio option's user-visible label. |
| ActiveSelected | Boolean | (None) | Gets or sets whether the active radio option is the default selection. |
| ActiveValue | String | (None) | Gets or sets the active radio option's submitted value. |
| Layout | Layouts | (None) | Gets or sets whether radio options are arranged vertically or horizontally. |
| Legend | String | (None) | Gets or sets the radio group's legend. |
## Notes
The group legend and individual option labels have distinct editing targets.
### JSON Format
`legend` contains the legend as plain text. `legendContent` contains the same legend with its rich-text formatting and is the value used when drawing and editing. `layout` stores `Layouts` as `0` Vertical or `1` Horizontal. While editing, `legendContent.listType` stores the active option's index; here it is an index, not a `ListNode.Types` value.
Radio options are represented by the inherited ordered `options` array of `FormOption` objects. Each option's `selected` Boolean records the default selection, and at most one option should be selected.
`legend` is omitted when empty and `layout` when Vertical; missing names restore those defaults.
### Legend and Options
When the group itself is selected, text toolbar commands and direct editing target the legend. Selecting an option displays an option-level selection outline and changes the inspector to that option's label, value, default selection, disabled state, and text styling.
Only one option can be the default selection. HTML output uses a fieldset and legend with properly associated radio inputs and labels.