SelectedText

Description

Obtains the selected text in the edit control of a DataWindow control.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control

Web ActiveX

DataWindow control

Syntax

PowerBuilder

string dwcontrol.SelectedText ( )

Web ActiveX

string dwcontrol.SelectedText ( ) 

Argument

Description

dwcontrol

A reference to a DataWindow control. The method reports the selected text in the edit control over the current row and column.

Returns

Returns the selected text in dwcontrol. If there is no selected text or if an error occurs, SelectedText returns the empty string (“”).

If dwcontrol is null, in PowerBuilder and JavaScript the method returns null.

Usage

NotePowerBuilder environment For use with RichTextEdit and other PowerBuilder controls, see SelectedText in the PowerScript Reference.

Examples

Example 1

If the text in the edit control of the DataWindow dw_rpt is James B. Smith and James B. is selected, these statements set the value of the string variable to James B:

string ls_emp_fname

ls_emp_fname = dw_rpt.SelectedText()

See also