Syntax 1 For DataWindows with standard presentation styles
Description
Determines the position of the insertion point in an edit
control.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control |
Web ActiveX |
DataWindow control |
Syntax
[PowerBuilder]
1 |
long <span>editname</span>.<span>Position</span> ( ) |
[Web ActiveX]
1 |
number <span>editname</span>.<span>Position</span> ( ) |
Argument |
Description |
---|---|
editname |
A reference to a DataWindow control in |
Return Values
Returns the location of the insertion point in editname if
it succeeds and –1 if an error occurs. If editname is
null, Position returns null.
Usage
Position reports the position number of
the character immediately following the insertion point. For example, Position returns
1 if the cursor is at the beginning of editname.
If text is selected in editname, Position reports
the number of the first character of the selected text.
Position reports the insertion point’s
position in the edit control over the current row and column.
For use with other PowerBuilder controls, see Position in
the PowerScript Reference.
Examples
If mle_EmpAddress contains Boston Street,
the cursor is immediately after the n in Boston, and no text is
selected, this statement returns 7:
1 |
mle_EmpAddress.<span>Position</span>() |
If mle_EmpAddress contains Boston Street
and Street is selected, this statement returns 8 (the position of
the S in Street):
1 |
mle_EmpAddress.<span>Position</span>() |