Insert()
IMathElementCollection::Insert(int32_t, System::SharedPtr<IMathElement>) method
Inserts a math element into the collection at the specified index.
virtual void Aspose::Slides::MathText::IMathElementCollection::Insert(int32_t index, System::SharedPtr<IMathElement> item)=0
Arguments
Parameter | Type | Description |
---|---|---|
index | int32_t | The zero-based index at which IMathElement should be inserted. |
item | System::SharedPtr<IMathElement> | The IMathElement to insert. |
Remarks
Example:
auto collection = System::MakeObject<MathBlock>(System::MakeObject<MathematicalText>(u"x"));
auto plusElement = System::MakeObject<MathematicalText>(u"+");
collection->Add(plusElement);
collection->Insert(0, System::MakeObject<MathRadical>(System::MakeObject<MathematicalText>(u"x"), System::MakeObject<MathematicalText>(u"3")));
See Also
- Typedef SharedPtr
- Class IMathElement
- Class IMathElementCollection
- Namespace Aspose::Slides::MathText
- Library Aspose.Slides