Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

SelectTextWord – PB Docs 2021 – PowerBuilder Library

SelectTextWord – PB Docs 2021

SelectTextWord

PowerScript function

Description

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

Applies to

RichTextEdit and DataWindow controls

Syntax

Argument

Description

rtename

The name of the RichTextEdit or DataWindow control in
which you want to select a word. The DataWindow object in the
DataWindow control must be a RichTextEdit DataWindow.

Return value

Integer.

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 does not 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.

Examples

The following statement selects the word containing the insertion
point:

This example selects the word at the insertion point. If there is no
word, it increments the position until it finds a word. It checks when it
reaches the end of a line and wraps to the next line as it looks for a
word. If this script is assigned to a command button and the button is
clicked repeatedly, you step through the text word by word:

See also

SelectedText

SelectText

SelectTextAll

SelectTextLine


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x