The OBJECT.PASTE() method is used with an Xdialog text control. It inserts the text contents of the Clip Board at the position of the cursor in the VariableName text variable.
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
Desktop applications only.