Class EquationNode
Contents
[
Hide
]EquationNode class
Abstract class for deriving other equation nodes.
public abstract class EquationNode : FontSetting
Properties
Name | Description |
---|---|
EquationType { get; } | Get the equation type of the current node |
Font { get; } | Returns the font of this object.(Inherited from FontSetting .) |
Length { get; } | Gets the length of the characters.(Inherited from FontSetting .) |
ParentNode { get; set; } | Specifies the parent node of the current node |
StartIndex { get; } | Gets the start index of the characters.(Inherited from FontSetting .) |
TextOptions { get; } | Returns the text options.(Inherited from FontSetting .) |
override Type { get; } | Represents the type of the node. |
Methods
Name | Description |
---|---|
static CreateNode(EquationNodeType, Workbook, EquationNode) | Create a node of the specified type. |
AddChild(EquationNode) | Inserts the specified node at the end of the current node’s list of child nodes. |
AddChild(EquationNodeType) | Insert a node of the specified type at the end of the child node list of the current node. |
override Equals(object) | Determine whether the current equation node is equal to the specified node |
GetChild(int) | Returns the node at the specified index among the children of the current node. |
InsertAfter(EquationNodeType) | Inserts the specified node after the current node. |
InsertBefore(EquationNodeType) | Inserts the specified node before the current node. |
InsertChild(int, EquationNodeType) | Inserts a node of the specified type at the specified index position in the current node’s child node list. |
Remove() | Removes itself from the parent. |
RemoveAllChildren() | Removes all the child nodes of the current node. |
RemoveChild(EquationNode) | Removes the specified node from the current node’s children. |
RemoveChild(int) | Removes the node at the specified index from the current node’s children. |
SetWordArtStyle(PresetWordArtStyle) | Sets the preset WordArt style.(Inherited from FontSetting .) |
ToLaTeX() | Convert this equtation to LaTeX expression. |
ToMathML() | Convert this equtation to MathML expression. |
Examples
using System;
using Aspose.Cells;
using Aspose.Cells.Drawing;
using Aspose.Cells.Drawing.Equations;
namespace AsposeCellsExamples
{
public class EquationsClassEquationNodeDemo
{
public static void Run()
{
// Create a new workbook
Workbook workbook = new Workbook();
// Access the first worksheet
Worksheet worksheet = workbook.Worksheets[0];
// Add a text box to the worksheet and get its index
int textBoxIndex = worksheet.TextBoxes.Add(10, 10, 200, 100);
TextBox textBox = worksheet.TextBoxes[textBoxIndex];
textBox.Text = "=A1+B1";
// Get the equation node from the text box
EquationNode node = textBox.GetEquationParagraph();
// Output the equation text using ToString()
Console.WriteLine("Equation: " + node.ToString());
// Modify the equation by setting new text
textBox.Text = "=A1*B1";
Console.WriteLine("Modified Equation: " + textBox.Text);
}
}
}
See Also
- class FontSetting
- namespace Aspose.Cells.Drawing.Equations
- assembly Aspose.Cells