Fired before the selected cell changes.
Parameters
Parameter | Description |
---|---|
CellCurrent | Cell that is currently selected |
CellNew | Cell to become selected |
Cause | The name of what caused the event |
RepeatCount | The number of times the navigatation key was repeated due to being held down |
Remarks
The PosChanging event is fired before the SelPos moves to a new cell. You can prevent the SelPos from changing by setting the Cancel property to 1.
The CellCurrent parameter indicates the location of the currently selected cell, and the CellNew parameter indicates the location of the cell to become selected. Each parameter contains the field and record location of the cells delimited by a semi-colon. For example, the first data cell has a value of "1;1".
Using the Cancel property to cancel the event only works if the event was qualified synchronously.
The Cause parameter is the name of what caused the position to change. It can have one of the following values
Value | Description |
---|---|
Ctrl Down | The user used CTRL and the down arrow |
Ctrl End | The user used CTRL and the END key |
Ctrl Home | The user used CTRL and the HOME key |
Ctrl Left Arrow | The user used CTRL and the left arrow |
Ctrl Pagedown | The user used CTRL and the PAGEDOWN key |
Ctrl Pageup | The user used CTRL and the PAGEUP key |
Ctrl Right | The user used CTRL and the right arrow |
Ctrl Up | The user used CTRL and the up arrow |
Delete | The user deleted a record and caused the position to move to another existing record |
Down | The user used the down arrow |
End | The user used the END key |
Enter | The user used the ENTER key |
Home | The user used the HOME key |
Left Mouse | The user used the left mouse button |
Left Arrow | The user used the left arrow |
New Record | The user created a new record and the position moved to the beginning of it |
Pagedown | The user used the PAGEDOWN key |
Pageup | The user used the PAGEUP key |
Reset | The user left the table and the position reset to the top left cell |
Right | The user used the right arrow |
Shift Tab | The user used SHIFT and the TAB key |
Tab | The user used the TAB key |
Undo | The user changed position by undoing a previous cell edit |
Up | The user used the up arrow |
The RepeatCount can be used to determine if the key mentioned in the Cause parameter was held down. If the value is 1, then the key has been pressed for the first time. If it's greater than one, then the key is being held down.