Syncfusion.XlsIO.Base
Example 


One-based row index of the top-left corner of the new item.
One-based column index of the top-left corner of the new item.

AddOptionButton(Int32,Int32) Method

Adds a IOptionButtonShape with default size.
Syntax
'Declaration
 
Overloads Function AddOptionButton( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As IOptionButtonShape
'Usage
 
Dim instance As IOptionButtons
Dim row As Integer
Dim column As Integer
Dim value As IOptionButtonShape
 
value = instance.AddOptionButton(row, column)
IOptionButtonShape AddOptionButton( 
   int row,
   int column
)

Parameters

row
One-based row index of the top-left corner of the new item.
column
One-based column index of the top-left corner of the new item.

Return Value

Returns options button.
Example
The following code illustrates how to add a IOptionButtonShape to the IOptionButtons collection.
using Syncfusion.XlsIO;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Add option button
            IOptionButtonShape optionButton = worksheet.OptionButtons.AddOptionButton(1, 1);
            
            //Set dimensions
            optionButton.Width = 100;
            optionButton.Height = 20;
            
            //Set text
            optionButton.Text = "Option";
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also