The SetAction Method is available as an add-on to the LEADTOOLS Medical Imaging toolkits.
- actionType
- The action to be assigned.
- mouseButton
- The Mouse event to be associated with the specified action.
- applyingOperation
- Indicates the cells that the action is applied to and when the action is applied.
Visual Basic (Declaration) | |
---|---|
Public Overridable Sub SetAction( _ ByVal actionType As MedicalViewerActionType, _ ByVal mouseButton As MedicalViewerMouseButtons, _ ByVal applyingOperation As MedicalViewerActionFlags _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As MedicalViewerBaseCell Dim actionType As MedicalViewerActionType Dim mouseButton As MedicalViewerMouseButtons Dim applyingOperation As MedicalViewerActionFlags instance.SetAction(actionType, mouseButton, applyingOperation) |
C# | |
---|---|
public virtual void SetAction( MedicalViewerActionType actionType, MedicalViewerMouseButtons mouseButton, MedicalViewerActionFlags applyingOperation ) |
C++/CLI | |
---|---|
public: virtual void SetAction( MedicalViewerActionType actionType, MedicalViewerMouseButtons mouseButton, MedicalViewerActionFlags applyingOperation ) |
Parameters
- actionType
- The action to be assigned.
- mouseButton
- The Mouse event to be associated with the specified action.
- applyingOperation
- Indicates the cells that the action is applied to and when the action is applied.
For an example, refer to Leadtools.MedicalViewer.MedicalViewer().
- An action must be added to a container before it can be assigned to a mouse button. To add an action to a container call AddAction
- If an action is set to a mouse button that is already used by another action, the new action will overwrite the old one.
- Verify that the mouse button can be assigned to the specified action before assigning the button. Do this by calling the IsValidForAction(MedicalViewerActionType,MedicalViewerMouseButtons) method. For example, if Leadtools.MedicalViewer.MedicalViewerMouseButtons.Wheel is passed to the mouseButton parameter and MedicalViewerActionType.MagnifyGlass to the actionType parameter, the method will throw an exception. If the same values are passed as parameters to the method IsValidForAction(MedicalViewerActionType,MedicalViewerMouseButtons), the method will return false, indicating that the mouse button cannot be used.
- Actions can also be associated with keystroke combinations. To assign an action to a keystroke combination, call MedicalViewerCell.SetActionKeys.
For more information, refer to Applying Actions and Creating a Bitmap Region.
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7