[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Forms.IOptionButton

IOptionButton Interface

Represents an option button control.

An option button lets users select a single choice from a group of mutually exclusive options. Option buttons are grouped by the containing IGroupBox. Option buttons in the same group share the linked cell value and update each other's selection state. If an option button is not contained in any group box, it belongs to the default group on the worksheet.

Namespace: GrapeCity.Documents.Excel.Forms
Assembly: DS.Documents.Excel.dll
Syntax
public interface IOptionButton : IControl<IOptionButton>, IContentControl, ICellLinkControl<bool>, ICellLinkControl, IControl
Public Interface IOptionButton
    Inherits IControl(Of IOptionButton), IContentControl, ICellLinkControl(Of Boolean), ICellLinkControl, IControl
Examples
IGroupBox groupBox = worksheet.Controls.AddGroupBox(20, 20, 120, 80);
groupBox.Text = "Shipping";
IOptionButton standard = worksheet.Controls.AddOptionButton(30, 40, 90, 18);
standard.Text = "Standard";
standard.LinkedCell = worksheet.Range["B1"];
standard.IsChecked = true;

Properties

Name Description
GroupBox

Gets the first group box that contains the option button.

Option buttons in the same group box are in the same group. If this method returns null, the option button belongs to the default group.

Option buttons in the same group share the value of the ICellLinkControl.LinkedCell property. They also affect the selection state of other option buttons in the same group.

IsChecked

Gets or sets whether the IOptionButton is checked.

For option buttons in the same group, a checked state indicates the currently selected option in that group.