Method XbpCrt():setTrackPointer() Foundation

Switches automatic mouse pointer tracking on or off.

Syntax
:setTrackPointer( <lTrack> ) --> lSuccess
Parameters
<lTrack>
<lTrack> contains a logical value that specifies whether automatic tracking of the mouse pointer is enabled for the XbpCrt object. If the value .T. (true) is assigned to this parameter, pointer tracking is enabled. Otherwise, the feature is disabled.
Return

This method returns .T. (true) if the method succeeds. In case of an error, :setTrackPointer() returns .F. (false),

Description

The method :setTrackPointer() enables or disables automatic tracking of the mouse pointer for a Crt object. If this feature is enabled, the xbeM_Enter and xbeM_Leave notifications are automatically generated when the mouse is moved into or out of the Crt window. This can be used to give visual feedback as to which Xbase Part would be activated if the mouse was clicked at a certain position.

The method :setTrackPointer() must be used if either xbeM_Enter or xbeM_Leave notifications should be processed via the event callback methods :enter() and/or :leave(). If a code block is assigned to one of the callback slots :enter or :leave, mouse pointer tracking is implicitly enabled. If an application uses :enter() and/or :leave() to implement custom processing for either notification, :setTrackPointer() must be called. This ensures that the respective notifications are generated, regardless of whether a code block is assigned to one of the callback slots.

In order to receive xbeM_Enter and xbeM_Leave notifications, mouse notifications must be enabled using SetMouse(.T.).

Feedback

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.