# IupConvertXYToPos

Definition: | include pGUI.e integer pos = IupConvertXYToPos(Ihandle ih, integer x, integer y)
Description: | Converts a (x,y) coordinate in an item position. ih: Identifier of the element. x: X coordinate relative to the left corner of the element. y: Y coordinate relative to the top corner of the element. Returns: the position starting at 0 (except for IupList that starts at 1). If fails returns -1.
pwa/p2js: | Not supported.
Notes: | It can be used for IupText and IupScintilla (returns a position in the string), IupList (returns an item), IupTree (returns a node identifier) or IupMatrix (returns a cell position, where pos=lin*numcol + col).
See Also: | IupText, IupList, IupTree, IupMatrix, See Also IupText, IupList, IupTree, IupMatrix, IupScintilla [DEV]