SelectTextWord

Description

Selects the word containing the insertion point in a RichTextEdit control.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control

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.

Returns

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.

NotePowerBuilder RichTextEdit control You can use the same syntax with a PowerBuilder RichText Edit control. See SelectTextWord in the PowerScript Reference.

Examples

Example 1

The following statement selects the word containing the insertion point:

dw_1.SelectTextWord()

Example 2

For more examples, see examples for the RichTextEdit control in the PowerScript Reference.

See also