Description
Obtains the selected text in the edit control of a DataWindow control.
Applies to
Syntax
PowerBuilder
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. |
Return value
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
PowerBuilder environment
For use with RichTextEdit and other PowerBuilder controls, see the section called “SelectedText” in PowerScript Reference.
Examples
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