TextBoxCollection.Add

TextBoxCollection.Add method

Adds a textbox to the collection.

public int Add(int upperLeftRow, int upperLeftColumn, int height, int width)
ParameterTypeDescription
upperLeftRowInt32Upper left row index.
upperLeftColumnInt32Upper left column index.
heightInt32Height of textbox, in unit of pixel.
widthInt32Width of textbox, in unit of pixel.

Return Value

TextBox object index.

Examples

using System;
using Aspose.Cells;

namespace AsposeCellsExamples
{
    public class TextBoxCollectionMethodAddWithInt32Int32Int32Int32Demo
    {
        public static void Run()
        {
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];

            int index = worksheet.TextBoxes.Add(1, 1, 50, 100);
            Console.WriteLine("TextBox added at index: " + index);
        }
    }
}

See Also