接口 ITextRange
public interface ITextRange
Represents the text frame in the
com.grapecity.documents.excel.IShape
.-
方法概要
修饰符和类型方法说明add()
Adds text to the specified collection.Adds text to the specified collection.Adds text to the specified collection.void
delete()
Deletes from parent.get
(int index) Gets theITextRange
with the specified index.int
getCount()
Returns the number of objects in the collection.getFont()
Returns theIFontFormat
object that represents character formattingfor theIFontFormat
object.int
getIndex()
Returns the index in the collection.Get the paragraphs ofITextRange
getRuns()
Get the runs ofITextRange
getText()
Gets a String value that represents the text in a text range.getType()
Returns the type ofITextRange
.void
Sets a String value that represents the text in a text range.
-
方法详细资料
-
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 theIFontFormat
object that represents character formattingfor theIFontFormat
object. -
getParagraphs
ITextRange getParagraphs()Get the paragraphs ofITextRange
This method is only used in
TextRangeType
.Body; otherwise, it throws InvalidOperateExecption. -
getRuns
ITextRange getRuns()Get the runs ofITextRange
This method is only used in
TextRangeType
.Paragraph; otherwise, it throws InvalidOperateExecption. -
get
Gets theITextRange
with the specified index.- 参数:
index
- The index.ITextRange
-
getCount
int getCount()Returns the number of objects in the collection. -
getIndex
int getIndex()Returns the index in the collection. -
getType
TextRangeType getType()Returns the type ofITextRange
. -
add
Adds text to the specified collection.- 参数:
newText
- The new text.- 返回:
- 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.- 参数:
newText
- The new text.position
- The position that you want to insert.- 返回:
- 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.
-