Functions and Directives

Function TBtoMousePos() Foundation

Moves TBrowse cursor to the location clicked with the left mouse button.

TBtoMousePos( <oTBrowse>, ;
              <nMouseRow>, <nMouseCol> ) --> nBrowseDirection
<oTBrowse> is a TBrowse object.
<nMouseRow> is the row on the screen where the mouse pointer is located.
<nMouseCol> is the column on the screen where the mouse pointer is located.

The function TBtoMousePos() returns a numeric code identifying the direction in which the TBrowse cursor will be moved in the next stabilization cycle. The return value orients itself to the numeric keypad (2 means "down", 6 means "right", 1 means "left down" etc). When the event code is not processed, the return value is zero and the Tbrowse cursor is not moved.


The function TBtoMousePos() is a service function for programming using TBrowse objects. It moves the TBrowse cursor to the position of the mouse pointer. The row and column position of the mouse pointer is determined by calling the function AppEvent() (see AppEvent()).

Calling TBtoMousePos() is generally not required since this function is called within TBHandleEvent() when the event is a left mouse click (xbeM_LbClick). The source code for this function is contained in the file BROWUTIL.PRG. The return value of the function corresponds with the return value of TBHandleEvent() (see TBHandleEvent()).


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.