Fired before the selected cell changes.

Parameters

ParameterDescription
CellCurrentCell that is currently selected
CellNewCell to become selected
CauseThe name of what caused the event
RepeatCountThe 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

ValueDescription
Ctrl DownThe user used CTRL and the down arrow
Ctrl EndThe user used CTRL and the END key
Ctrl HomeThe user used CTRL and the HOME key
Ctrl Left ArrowThe user used CTRL and the left arrow
Ctrl PagedownThe user used CTRL and the PAGEDOWN key
Ctrl PageupThe user used CTRL and the PAGEUP key
Ctrl RightThe user used CTRL and the right arrow
Ctrl UpThe user used CTRL and the up arrow
DeleteThe user deleted a record and caused the position to move to another existing record
DownThe user used the down arrow
EndThe user used the END key
EnterThe user used the ENTER key
HomeThe user used the HOME key
Left MouseThe user used the left mouse button
Left ArrowThe user used the left arrow
New RecordThe user created a new record and the position moved to the beginning of it
PagedownThe user used the PAGEDOWN key
PageupThe user used the PAGEUP key
ResetThe user left the table and the position reset to the top left cell
RightThe user used the right arrow
Shift TabThe user used SHIFT and the TAB key
TabThe user used the TAB key
UndoThe user changed position by undoing a previous cell edit
UpThe 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.

See Also

PosChanged

  • No labels