Xbasic
TEXT.SHOW_CARET Function
Syntax
VariableName.OBJECT.SHOW_CARET()
Description
The OBJECT.SHOW_CARET() method is used with an Xdialog text control. It displays the cursor in the VariableName text variable, causing the text box to scroll if it is not currently visible.
Example
dim ptext as P dim ptext.text as C dim ptext.object as P dim ip as N dim new_ip as N if a_dlg_button = "paste" then a_dlg_button = "" 'get the current insertion point ip = ptext.object.get_cursor() new_ip = ip + len(ClipBoard.Get_Data()) ptext.object.paste() 'after clicking the 'paste' button focus is on the button. we want to return focus to the edit control ui_dlg_ctl_goto(dlg_title,"ptext") ptext.object.set_cursor(new_ip) 'this causes the text box to scroll if the insertion point is not currently visible ptext.object.show_caret() end if
Limitations
Desktop applications only.
See Also