psShortcut - cCJAction
Gets and sets the shortcut key text that appears to the right in a menu item
Type: Property
Access: Read/Write
Data Type: String
Parameters: None
Syntax
Property String psShortcut
| Access Type | Syntax |
|---|---|
| Read Access: | Get psShortcut to StringVariable |
| Write Access: | Set psShortcut to StringVariable/Value |
Description
psShortcut is used to set and get the shortcut key assignment text that will appear on the right of a menu item.
This assigns text and does not actually assign the shortcut key. You can set this text value to anything you want. Typically you will use this property to describe an accelerator key that has been assigned using the On_Key command.
Sample
Object oMyMenuItem is cCJMenuItem
Set psCaption to "Select Me"
Set psToolTip to "Select Me in tooltip"
Set psDescription to "Select Me in idle statusbar pane"
Set psImage to "SelectMe.ico"
Set psShortCut to "ctrl+S"
Procedure OnExecute
Showln "Select Me was selected"
End_Procedure
End_Object
You can also use the piShortCutKey property to assign key actions to an item. When you use this, you should not use the psShortCut property. When you assign Codejock shortcut keys, you can choose to display their value automatically by setting the cCJCommandBarSystem pbToolBarAccelTips property to true.
See Also