PositionFromPointClose not always useful for dragdrop

f rom wrote:

p=editor.PositionFromPointClose(x,y)

returns -1 if you drop on an empty line. Is there another function I can use to find the line from the drop coordinates ?

     // Find the position from a point within the window.
     int PositionFromPoint(wxPoint pt);

     // Find the position from a point within the window but return
     // INVALID_POSITION if not close to text.
     int PositionFromPointClose(int x, int y);

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!