TextFrameSetText

Description

Sets the text for a text frame.

Applies to

RichTextEdit control

Syntax

boolean TextFrameSetText(integer textFrameID, string text)
boolean TextFrameSetText(integer textFrameID, long start, long length, string text)

Argument

Description

textFrameID

The unique ID that identifies the text frame.

start The starting position in the text frame to add the text. 0 means the start of the text.
length The length in the text frame to add the text. -1 means till the end of the text. 0 means the full length of the text being added.
text The text to add in the text frame.

Return value

Boolean.

Returns true if it succeeds. Returns false if it fails. Returns null if any argument is null.

Examples

The following example sets the text content in the specified text frame.

boolean lb_rtn
integer li_frameid

li_frameid = rte_1.TextFrameInsertAsChar(-1,5000,1000)

//setting whole text
lb_rtn = rte_1.TextFrameSetText(li_frameid,"Test ABC 456!")
messagebox("TextFrameSetText",string(lb_rtn))

//setting part text
lb_rtn = rte_1.TextFrameSetText(li_frameid,5,3,"123")
messagebox("TextFrameSetText",string(lb_rtn))