# UserInterfaceRadioButton class

Namespace: [Rhino.UI](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.ui.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public class UserInterfaceRadioButton : UserInterfaceControl
```

Draws a radio button with optional text beside it. Radio buttons that belong to the same group take turns: turning one on turns off whichever one was on before it, so exactly one button in a set is on at a time. Clicking a button that is already on does nothing.

A group is the radio buttons that share a Group number, sit in the same container and belong to the same document. The default group number is 0, so a set of radio buttons added to one grid is already a group. Give each set its own number when a container holds more than one set.

## Constructors

- [UserInterfaceRadioButton](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceradiobutton/ctor.md): (3 overloads)

## Properties

- [Checked](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceradiobutton/checked.md): Is this the button that is on in its group? Turning a button on turns off every other button in its group. Setting this does not raise CheckedChanged; that is only for a state the user changed.
- [CheckedButtonInGroup](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceradiobutton/checkedbuttoningroup.md): The button in this button's group that is on, which can be this button, or null when nothing in the group has been turned on yet. The buttons have to have been added to a document for this to find anything, since it is the native side that keeps track of a group.
- [Group](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceradiobutton/group.md): Which set of radio buttons this one belongs to. The default is 0. Two sets of radio buttons in the same container need different group numbers or they will turn each other off.

## Methods

- [OnCheckedChanged](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceradiobutton/oncheckedchanged.md): Called after a click or a key has changed the state of this button. Both ends of the change are told, the button that came on and the button that went off, so a set can be watched from any one of its buttons. The default implementation raises the CheckedChanged event.

## Events

- [CheckedChanged](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceradiobutton/checkedchanged.md): Event triggered when a click or a key changes the state of this radio button

## Inherited Members

- From [UserInterfaceControl](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol.md): [BackgroundColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/backgroundcolor.md), [HorizontalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/horizontalalignment.md), [Location](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/location.md), [Size](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/size.md), [Text](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/text.md), [TextColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/textcolor.md), [TextHeight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/textheight.md), [TextHorizontalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/texthorizontalalignment.md), [TextVerticalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/textverticalalignment.md), [TrackingPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/trackingpoint.md), [VerticalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/verticalalignment.md), [ComputedRectangle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/computedrectangle.md), [SetSvg](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/setsvg.md)
- From [UserInterfaceObjectBase](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase.md): [BoundToActiveView](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/boundtoactiveview.md), [HasKeyboardFocus](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/haskeyboardfocus.md), [Tooltip](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/tooltip.md), [Visible](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/visible.md), [IsMouseOver](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/ismouseover.md), [IsRegistered](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/isregistered.md), [OnDraw](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/ondraw.md), [OnMouseClick](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseclick.md), [OnMouseDoubleClick](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousedoubleclick.md), [OnMouseDown](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousedown.md), [OnMouseEnter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseenter.md), [OnMouseLeave](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseleave.md), [OnMouseMove](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousemove.md), [OnMouseUp](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseup.md), [OnRunCommand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onruncommand.md), [RegisterForAllDocuments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/registerforalldocuments.md), [RunCommand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/runcommand.md), [Unregister](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/unregister.md)
