Xbasic
RTF.INSERT_TEXT Function
Syntax
.INSERT_TEXT( New_Text as C )
Arguments
- New_Text
Text to insert.
Description
The .INSERT_TEXT() method inserts New_Text at the cursor location.
Example
dim crtf.object as P dim crtf.text as C dim new_text as C dim temp as C crtf.object = rtf.create(" ") crtf.object.insert("RTF Text to stretch over one line, so you can see what full justify does", 1) crtf.text = crtf.object.rtf_text ui_dlg_box("Xdialog Sample", <<%dlg% {rtf=30,10crtf}; {lf}; Text [.5new_text]; ; ; %dlg%,<<%code% if a_dlg_button="Replace" then a_dlg_button = "" crtf.object.replace_text(new_text) end if if a_dlg_button="Insert_Text" then a_dlg_button = "" crtf.object.insert_text(new_text) end if crtf.text = crtf.object.rtf_text %code%)
Limitations
Desktop applications only.
See Also