Spread Windows Forms 6.0 Product Documentation
Get Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > ActionMap Class : Get Method


key
Keyboard key for which to get binding

Glossary Item Box

Returns the binding to an action for the specified key.

Syntax

Visual Basic (Declaration) 
Public Function Get( _
   ByVal key As Object _
) As Action
Visual Basic (Usage)Copy Code
Dim instance As ActionMap
Dim key As Object
Dim value As Action
 
value = instance.Get(key)
C# 
public Action Get( 
   object key
)

Parameters

key
Keyboard key for which to get binding

Return Value

Action object containing the action

Remarks

This method queries the parent action map if the binding is not defined in the current action map.

Example

This example returns the map for the InputMap object.

Note: This returns the obfuscated string of the StopEditingAction class, which is the default map for the Enter key. It is a meaningless string to the user. The object variable would return the StopEditing action.

C#Copy Code
FarPoint.Win.Spread.Keystroke k = new FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None);
Object obj = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused).Get(k);
FarPoint.Win.Spread.ActionMap map = fpSpread1.GetActionMap();
listBox1.Items.Add(map.Get(obj));
Visual BasicCopy Code
Dim k As New FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None)
Dim obj As Object = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused).Get(k)
Dim map As FarPoint.Win.Spread.ActionMap = FpSpread1.GetActionMap()
ListBox1.Items.Add(map.Get(obj))

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.