Reports the position of the first selected character in the edit control.
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control |
Web ActiveX |
DataWindow control |
long dwcontrol.SelectedStart ( )
number dwcontrol.SelectedStart ( )
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control. It reports the starting position in the edit control over the current row and column. |
Returns the starting position of the selected text in dwcontrol. 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 dwcontrol is null, in PowerBuilder and JavaScript the method returns null.
SelectedStart counts from the start of the text and includes spaces and line endings.
PowerBuilder environment For use with RichTextEdit and other PowerBuilder controls, see SelectedStart in the PowerScript Reference.
If the edit control for the DataWindow control dw_rpt contains Closed for Vacation July 3 to July 10, and Vacation is selected, then this example sets the variable to 12 (the position of the first character in Vacation):
integer li_Start
li_Start = dw_rpt.SelectedStart()