Description
Selects the word containing the insertion point in a RichTextEdit control.
Applies to
Syntax
PowerBuilder
integer rtename.SelectTextWord ( )
Argument |
Description |
---|---|
rtename |
A reference to a DataWindow control in which you want to select a word. The DataWindow object in the DataWindow control must be a RichTextEdit DataWindow. |
Return value
Returns the number of characters selected if it succeeds and -1 if a word cannot be selected or an error occurs.
Usage
A word is any group of alphanumeric characters. A word can include underscores and single quotes but doesn't include punctuation and special characters such as $ or #.
If punctuation or special characters follow the selected word, they are not selected. If the character after the insertion point is a space, punctuation, special character, or end-of-line mark, SelectTextWord does not select anything and returns -1.
PowerBuilder RichTextEdit control
You can use the same syntax with a PowerBuilder RichText Edit control. See the section called “SelectTextWord” in PowerScript Reference.
Examples
The following statement selects the word containing the insertion point:
dw_1.SelectTextWord()
For more examples, see examples for the RichTextEdit control in PowerScript Reference.
See also