Xdialog Text Pointer
Xdialog allows you to control the insertion point and selected text in a text control on an Xdialog box. Normally, when you place a text control on an Xdialog box, you bind the control to a character variable. For example:
text = "some text" ui_dlg_box("title","[.20text]")
However, if you want to be able to control the Insertion Point and Selected text, then you must bind the control to a pointer variable that has a .text and a .object property, as shown in the example below. The .text property contains the text in the variable. The .object property gives you access to the properties and methods of this text object.
dim ptext as P dim ptext.text as C dim ptext.object as P ptext.text = "some text" ui_dlg_box("title","[.20ptext]"); ptext.object.delete()
The methods available to manipulate an Xdialog text control are:
Cuts the currently selected text.
Returns the position of the cursor.
Returns the currently selected text
Inserts the TextString at the position of the cursor.
Inserts the text contents of the Clip Board at the position of the cursor.
Inserts the TextString at the location of the currently selected text.
Highlights text in the text control.
Sets the location of the cursor and sets focus to the text control.
Displays the cursor, causing the text box to scroll if it is not currently visible.