TabSheetObject.isUnderCoordAndMouse

Syntax

isUnderCoordAndMouse(coord: PP.Ui.TabSheetCoord);

Parameters

coord. Coordinate for which you need to define if it belongs to the object.

Description

The isUnderCoordAndMouse method determines whether specified coordinates correspond to an object in the table, and if this object is under the mouse cursor.

Comments

This method returns True if specified coordinates correspond to object in the table and these coordinates are under mouse cursor, otherwise the method returns False.

Coordinates correspond to object in the table if they match coordinates of its top left corner.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component) and the TabSheetObject component (see the TabSheetObject Constructor page). Process the MouseMove event (cursor movement across the table) removing the objects after the cursor moves over them:

// Process the MouseMove event
tabSheet.MouseMove.add(function (sender, eventArgs) {         
    // Determine coordinates of the top left object corner in table
    var coord = tabSheetObject.getTopLeftCoord();
    if (tabSheetObject.isUnderCoordAndMouse(coord)) {
        // Delete object from table
        tabSheetObject.remove()
    }
});

Before executing the example the table with the added object looks as follows:

After executing the example all objects in the table are removed after the cursor moves over them:

See also:

TabSheetObject