OpenInsight 10.2 adds a new event called CELLPOSCHANGED to the EDITTABLE control. This is effectively the same as the normal POSCHANGED event but with the addition of an extra parameter called "ContextFlags" that provides more information on why the event was raised.
bForward = CELLPOSCHANGED( CtrlEntID, | CtrlClassID, | NextColumn, | NextRow, | ContextFlags )
ContextFlags is a simple bitmask integer that contains the following flags:
Bit Flag Value | Description |
---|---|
0x00000001 | If set then the cell position was changed via a keystroke. |
0x00000002 | If set then the cell position was changed via the mouse. |
Equates for these flags can be found in the PS_EDITTABLE_EQUATES insert record:
Equ PS_EDT_CTF_NONE$ To 0x00000000; Equ PS_EDT_CTF_KEYSTROKE$ To 0x00000001; Equ PS_EDT_CTF_MOUSECLICK$ To 0x00000002;
Example - testing to see if the position (CARETPOS) was changed via a mouse click:
$Insert PS_EditTable_Equates If BitAnd( ContextFlags, PS_EDT_CTF_MOUSECLICK$ ) Then // CARETPOS was changed by using the mouse. ... End