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

SelectedStart – PB Docs 2019 – PowerBuilder Library

SelectedStart – PB Docs 2019

SelectedStart

PowerScript function

Description

Reports the position of the first selected character in an editable
control.

Applies to

DataWindow, EditMask, MultiLineEdit, SingleLineEdit, RichTextEdit,
DropDownListBox, and DropDownPictureListBox controls

Syntax

Argument

Description

editname

The name of the DataWindow, EditMask, MultiLineEdit,
SingleLineEdit, RichTextEdit, DropDownListBox, or
DropDownPictureListBox control in which you want to determine
the starting position of selected text.

For a DataWindow, it reports the starting position in the
edit control over the current row and column.

Return value

Long.

Returns the starting position of the selected text in editname. If
no text is selected, SelectedStart returns the position of the character
immediately following the insertion point. If an error occurs,
SelectedStart returns -1. If editname is null, SelectedStart returns
null.

Usage

For all controls except RichTextEdit, SelectedStart counts from the
start of the text and includes spaces and line endings.

For RichTextEdit controls, SelectedStart counts from the start of
the line on which the selection begins. The start is at the opposite end
of the selection from the insertion point. For example, if the user
dragged back to make the selection, the start of the selection is at the
end of the highlighted text and the insertion point is before the start.
Use the Position function to get information about the start and end of
the selection.

Focus and the selection in a drop-down list

When a DropDownListBox or DropDownPictureListBox loses focus, the
selected text is no longer selected.

Examples

If the MultiLineEdit mle_Comment contains Closed for Vacation July 3
to July 10, and Vacation is selected, then this example sets li_Start to
12 (the position of the first character in Vacation):

See also

Position

SelectedLine

SelectedPage


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