Provides clipboard support for the C1ReportDesigner control.
Namespace:
C1.Win.C1ReportDesignerAssembly: C1.Win.C1ReportDesigner.2 (in C1.Win.C1ReportDesigner.2.dll)
Syntax
C# |
---|
public class ClipboardHandler |
Visual Basic |
---|
Public Class ClipboardHandler |
Remarks
The ClipboardHandler class has methods for copying and pasting report fields to and from
the clipboard, and for detecting the selection and clipboard status.
Examples
The example below shows how you can use the ClipboardHandler class to provide clipboard
commands in your report designer application.
Copy CodeC#
// handle clipboard commands (for reports and fields) private void HandleClipboard(ToolBarButton cmd) { // save undo state for all but copy if (cmd != _btnCopy) { _designer.UndoStack.SaveState(); _dirty = true; } // execute command ClipboardHandler clip = _designer.ClipboardHandler; if (cmd == _btnCut) clip.Cut(); if (cmd == _btnCopy) clip.Copy(); if (cmd == _btnPaste) clip.Paste(); if (cmd == _btnDelete) clip.Delete(); // update UI when done UpdateUI(); } // update UI (_menus, toolbars, etc) private void UpdateUI() { _btnUndo.Enabled = _designer.UndoStack.CanUndo; _btnRedo.Enabled = _designer.UndoStack.CanRedo; _btnCut.Enabled = _btnCopy.Enabled = _btnDelete.Enabled = _designer.ClipboardHandler.CanCut; _btnPaste.Enabled = _designer.ClipboardHandler.CanPaste; } |