A script-enabled browser is required for this page to function properly.

SYSTEM.MOUSE_ITEM System Variable

Syntax

SYSTEM.MOUSE_ITEM

Description

If the mouse is in an item, SYSTEM.MOUSE_ITEM represents the name of that item as a CHAR value. For example, if the mouse is in Item1 in Block2, the value for SYSTEM.MOUSE_ITEM is :BLOCK2.ITEM1.

SYSTEM.MOUSE_ITEM is NULL if:

If you use SYSTEM.MOUSE_ITEM in a WHEN-BUTTON-PRESSED-Trigger, it doesn't work (SYSTEM.MOUSE_ITEM has got a null value) as long, as there is no MOUSE-Trigger defined in the FORM.

SYSTEM.MOUSE_ITEM Examples

/* Trigger: When-Mouse-Click

** Example: Dynamically repositions an item if:
** 1) the operator clicks mouse button 2
** on an item and
** 2) the operator subsequently clicks mouse button
** 2 on an area of the canvas that is
** not directly on top of another item.
*/
DECLARE
item_to_move VARCHAR(50);
the_button_pressed VARCHAR(50);
target_x_position NUMBER(3);
target_y_position NUMBER(3);
the_button_pressed VARCHAR(1);
BEGIN
/* Get the name of the item that was clicked.
*/
item_to_move := :System.Mouse_Item;
the_button_pressed := :System.Mouse_Button_Pressed;
/*
** If the mouse was clicked on an area of a canvas that is
** not directly on top of another item, move the item to
** the new mouse location.
*/
IF item_to_move IS NOT NULL AND the_button_pressed = '2' THEN
target_x_position := To_Number(:System.Mouse_X_Pos);
target_y_position := To_Number(:System.Mouse_Y_Pos);
Set_Item_Property(item_to_move,position,
target_x_position,target_y_position);
target_x_position := NULL;
target_y_position := NULL;
item_to_move := NULL;
END IF;
END;


SYSTEM.MOUSE_BUTTON_PRESSED examples

SYSTEM.MOUSE_BUTTON_SHIFT_STATE examples

SYSTEM.MOUSE_CANVAS examples

SYSTEM.MOUSE_FORM system variable

SYSTEM.MOUSE_RECORD examples

SYSTEM.MOUSE_RECORD_OFFSET system variable

SYSTEM.MOUSE_X_POS examples

SYSTEM.MOUSE_Y_POS examples