Xbasic
RTF.GET_CURSOR Function
Syntax
Location as N = .GET_CURSOR()
Arguments
- Location
An offset from the first position in the RTF text.
Description
The .GET_CURSOR() method returns the location of the cursor in the RTF text.
Example
dim crtf.text as C dim Location as N 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}; Location [.5Location]; ; ; ; %dlg%,<<%code% if a_dlg_button="Get_Cursor" then Location = crtf.object.get_cursor() ui_msg_box("Cursor","Located at " + Location) a_dlg_button = "" end if if a_dlg_button="Set_Cursor" then crtf.object.Set_Cursor(Location) a_dlg_button = "" end if if a_dlg_button="Show_Caret" then crtf.object.Show_Caret() ui_dlg_ctl_goto("Xdialog Sample","crtf") a_dlg_button = "" end if %code%)
Limitations
Desktop applications only.
See Also