GetActionKey, ScriptGetActionKey Methods
Applies To
fpSpread control
Description
Returns the shortcut key or navigation key assigned to a specified action.
Syntax
C++
BOOL CSpreadSheet::GetActionKey(long Action, BOOL* fShift, BOOL* fCtrl, short* Key);
Visual Basic
fpSpread.GetActionKey(ByVal Action As Long, fShift As Boolean, fCtrl As Boolean, Key As Integer) As Boolean
Note: The ScriptGetActionKey method uses the same syntax except method parameters that are not passed "ByVal" are declared as variants. For more information on Script methods, see Scripting Environment Usage. |
Parameters
The following parameters are available:
Parameter | Description | ||
---|---|---|---|
Action | Action for which to return navigation or shortcut keys | ||
Choose one of the following values: | |||
Value | Constant | Description | |
0 | ActionKeyClear | Clears the active cell | |
1 | ActionKeyCurrent | Displays the current date and time in a date or time cell | |
2 | ActionKeyPopup | Displays a pop-up calendar in a date cell | |
fShift | Returns the state of the Shift key | ||
fCtrl | Returns the state of the Ctrl key | ||
Key | Key assigned to the specified action. Can be any virtual key code.Note If you use alphabetical keys, you must use uppercase letters for this parameter. |
Remarks
Use the SetActionKey method to specify a navigation or shortcut key for a specified action.
Note: Call this method if you use the Spread control in a scripting environment (for example, Microsoft's Visual InterDev or Internet Explorer) or a non-scripting environment. However, if you want to use the Spread control in a scripting environment and you want to change any parameter that is not passed "ByVal", you must set the ScriptEnhanced property to True and call the ScriptGetActionKey method. ScriptGetActionKey method parameters that are not passed "ByVal" are declared as variants. |
This method is applied to the entire workbook, including all sheets in the control.
Return Type
True if successful; otherwise, False.
See Also
Changing or Turning Off the Action Keys
SetActionKey method
ScriptEnhanced property
DLL Correspondence
SSGetActionKey function