Aspose::Cells::Drawing::TextBoxCollection class
Contents
[
Hide
]TextBoxCollection class
Encapsulates a collection of TextBox objects.
class TextBoxCollection
Methods
Method | Description |
---|---|
Add(int32_t upperLeftRow, int32_t upperLeftColumn, int32_t height, int32_t width) | Adds a textbox to the collection. |
Clear() | Clear all text boxes. |
Get(int32_t index) | Gets the TextBox element at the specified index. |
Get(const U16String& name) | Gets the TextBox element by the name. |
Get(const char16_t* name) | Gets the TextBox element by the name. |
GetCount() | |
IsNull() const | Checks whether the implementation object is nullptr. |
explicit operator bool() const | operator bool() |
operator=(const TextBoxCollection& src) | operator= |
RemoveAt(int32_t index) | Remove a text box from the file. |
TextBoxCollection(TextBoxCollection_Impl* impl) | Constructs from an implementation object. |
TextBoxCollection(const TextBoxCollection& src) | Copy constructor. |
~TextBoxCollection() | Destructor. |
Fields
Field | Description |
---|---|
_impl | The implementation object. |
Examples
Aspose::Cells::Startup();
//Instantiating a Workbook object
Workbook workbook;
//get collection object
TextBoxCollection textBoxCollection = workbook.GetWorksheets().Get(0).GetTextBoxes();
//add a textbox
textBoxCollection.Add(1, 1, 50, 100);
for (int i = 0; i < textBoxCollection.GetCount(); ++i)
{
TextBox tbox = textBoxCollection.Get(i);
//do what you want
}
Aspose::Cells::Cleanup();
See Also
- Namespace Aspose::Cells::Drawing
- Library Aspose.Cells for C++