TextEdit.CharPosAtXY

From Real Software Documentation

Jump to: navigation, search
Method
TextEdit.CharPosAtXY ( X as Integer, Y as Integer ) As Integer

Returns as an Integer the character position for pixel coordinates X, Y relative to the control.

Notes

Characters are numbered consecutively from the start until the end of the control. The first character is numbered 1.

Example

This example is in the MouseDown event of the control. The event passes in the X,Y coordinates of the MouseDown event. The example gets the position of the character at the passed coordinates.

dim i as integer
i=me.CharPosAtXY(x,y)

MsgBox str (i)
return true
Personal tools