Page History
...
Like all Before events, you can use prevent the cell from entering into edit mode by setting the Cancel property to 1. Unlike other Before events, however, there is no matching AfterEdit event. Instead, the BeforeUpdate and AfterUpdate events are fired when a cell is leaving edit mode.
Using the Cancel property to cancel the event only works if the event was qualified synchronously.
...
Any of the 12 function keys can be assigned a task via the FunctionKey property. If a function key is used to trigger edit mode, then it will be passed via the Reason parameter. For example, using F4 to enter into edit mode will cause the Reason parameter to be set to "F4" as well.
...
Navigation triggered edit mode occurs when the user navigates from one cell in edit mode to another cell, and the edit mode carries over. For example, if all cells' CellEditMode properties are set to "Edit", they go into edit mode as soon as they receive focus. Therefore, you might see one of the following values in the Reason parameter as a result.
...
As you may have noticed, these are the same values that can be passed in the Cause parameter of the PosChanged and PosChanging events.
Typed Character Triggered Event Mode
...
Value | Description |
---|---|
ComboDropDown | The cell is entering edit mode because it's combo drop down is appearing, whether by user action or by setting the ComboDropDown property |
EditCell | Method The cell is entering edit mode because the EditCell method was called |
...
There is one limitation with this feature. The BeforeEdit event will not fire when the control gets focus. During tests, firing this event while getting focus would cause OI to remove and reset focus over and over until the control hung. Therefore, the logic for firing the event during GotFocus was removed. Instead, you can use the table's GotFocus event to capture edit mode, assuming of course your cells' CellEditMode properties are all the "Edit" mode.
Example
Code Block |
---|
TransferTransfer Param1 to Cell Transfer Param2 to Reason // When a user double clicks to edit a cell, display a custom edit window If Reason _EQC "Double Click" then // Cancel the normal edit mode Call Set_Property(CtrlEntId, "OLE.Cancel", 1) // Use our own Call Show_Custom_Edit_Window(CtrlEntId, Cell) endend |