You can load or save the input maps to an XML file. Use the SaveXmlInputMapFile method to save to a file and the LoadXmlInputMapFile to load from an input map file.
Spread installs a default Excel compatibility XML file to the input map folder.
Using Code
- Create an input map.
- Save the input map to a file.
Example
This example saves an input map to an XML file.
C# |
Copy Code
|
FarPoint.Win.Spread.SpreadView sv = fpSpread1.GetRootWorkbook();
FarPoint.Win.Spread.InputMap im = new FarPoint.Win.Spread.InputMap();
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextRow);
sv.SetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused, im);
fpSpread1.SaveXmlInputMapFile("file.xml", FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused, FarPoint.Win.Spread.OperationMode.Normal);
|
VB |
Copy Code
|
Dim sv As FarPoint.Win.Spread.SpreadView = FpSpread1.GetRootWorkbook
Dim im As New FarPoint.Win.Spread.InputMap()
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextRow)
sv.SetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused, im)
FpSpread1.SaveXmlInputMapFile("file.xml", FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused,
FarPoint.Win.Spread.OperationMode.Normal)
|
Using the Spread Designer
- Select the Settings menu and then select the Input Map icon located under the Other Settings section.
- From the Select InputMap section, select the mode options.
- Specify the shortcut key and action.
- Click Add to add the new input map.
- Use the Save button to save the input map to a file. Use the Load Input Maps button to load an input map file instead.
- Select OK to apply the input map.
- From the File menu choose Apply and Exit to apply your changes to the component and exit Spread Designer.
See Also