Interface ITextRange
public interface ITextRange
Represents the text frame in the
com.grapecity.documents.excel.IShape.-
Method Summary
Modifier and TypeMethodDescriptionadd()Adds text to the specified collection.Adds text to the specified collection.Adds text to the specified collection.voiddelete()Deletes from parent.get(int index) Gets theITextRangewith the specified index.intgetCount()Returns the number of objects in the collection.getFont()Returns theIFontFormatobject that represents character formattingfor theIFontFormatobject.intgetIndex()Returns the index in the collection.Get the paragraphs ofITextRangegetRuns()Get the runs ofITextRangegetText()Gets a String value that represents the text in a text range.Gets the horizontal alignment of the text.getType()Returns the type ofITextRange.voidSets a String value that represents the text in a text range.voidsetTextAlignment(TextAlignmentAnchor textAlignment) Sets the horizontal alignment of the text.
-
Method Details
-
getText
String getText()Gets a String value that represents the text in a text range. -
setText
Sets a String value that represents the text in a text range. -
getFont
IFontFormat getFont()Returns theIFontFormatobject that represents character formattingfor theIFontFormatobject. -
getParagraphs
ITextRange getParagraphs()Get the paragraphs ofITextRangeThis method is only used in
TextRangeType.Body; otherwise, it throws InvalidOperateExecption. -
getRuns
ITextRange getRuns()Get the runs ofITextRangeThis method is only used in
TextRangeType.Paragraph; otherwise, it throws InvalidOperateExecption. -
get
Gets theITextRangewith the specified index.- Parameters:
index- The index.ITextRange
-
getCount
int getCount()Returns the number of objects in the collection. -
getIndex
int getIndex()Returns the index in the collection. -
getTextAlignment
TextAlignmentAnchor getTextAlignment()Gets the horizontal alignment of the text. -
setTextAlignment
Sets the horizontal alignment of the text. -
getType
TextRangeType getType()Returns the type ofITextRange. -
add
Adds text to the specified collection.- Parameters:
newText- The new text.- Returns:
- The new
ITextRange. This property is only used in Body and Paragraph. Use this property on Body and it will add a paragraph with a run. Use this property on Paragraph and it will add a run.
-
add
ITextRange add()Adds text to the specified collection. -
add
Adds text to the specified collection.- Parameters:
newText- The new text.position- The position that you want to insert.- Returns:
- The new
ITextRange. This property is only used in Body and Paragraph. Use this property on Body and it will add a paragraph with a run. Use this property on Paragraph and it will add a run.
-
delete
void delete()Deletes from parent.
-