Selects the word containing the insertion point in a RichTextEdit control.
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control |
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. |
Returns the number of characters selected if it succeeds and –1 if a word cannot be selected or an error occurs.
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 SelectTextWord in the PowerScript Reference.
The following statement selects the word containing the insertion point:
dw_1.SelectTextWord()
For more examples, see examples for the RichTextEdit control in the PowerScript Reference.