Saturday, October 11, 2008  



 FarPoint Technologies
 (800) 645-5913

 fpsales@fpoint.com



     
 »Spread for Windows Forms » Product Tour » User Interaction » Overall Control

Previous Customizing Interaction in the Overall Control Next

You can control many aspects of the user interaction with the overall control.

  Back to Top
 Customizing Clipboard Operation Options
You can control how the users interact with the contents of the Clipboard when they perform copying and pasting actions in cells in the Spread control. You can set whether to include headers or not when performing Clipboard operations, set whether the shortcut keys are available to the user, or set the type of data that is pasted when a Clipboard paste is performed by the user.

  Back to Top
 Customizing Undo and Redo Actions
With the undo/redo feature, you can add capability to your application to undo various actions in the spreadsheet performed by your end user. You make use of the UndoAction class and several specific classes that correspond with those various user actions. There is also a manager class that keeps track of the end user actions that can be undone and re-done.

The SpreadView class and FpSpread class have properties, AllowUndo and UndoManager, which turn on and off the undo/redo feature and return the UndoManager for that SpreadView instance, respectively. Each SpreadView has its own UndoManager.


  Back to Top
 Customizing Interaction Based on Events
Spread includes over 100 events that allow you to further customize the users interaction with the control. From ButtonClicked to LeaveCell to SelectionChanged, you can use these events to initiate actions for your user.

  Back to Top
 Customizing the Scroll Bars
You can control the display and operation of the scroll bars on the control:
  • When to display either a vertical or horizontal scroll bar or both on the edges of the sheet in the control. You can hide them, display them as needed (when there are more rows or columns than can be displayed), or display them all the time. Use the HorizontalScrollBarPolicy and VerticalScrollBarPolicy properties to determine which scroll bars display.

  • The dimensions of the scroll bars. Use the HorizontalScrollBarHeight and VerticalScrollBarWidth properties to set the dimensions.

  • Whether the spreadsheet scrolls across the display when the user moves the scroll box (tracking). Use the ScrollBarTrackPolicy property to set tracking.

  • How much of the spreadsheet the end user can scroll through. Use the ScrollBarShowMax property.

  • Whether to align the scrolls with the last row and column. Use the ScrollBarMaxAlign property.

  • Whether scroll tips (on the control only) are displayed as described in Setting Scroll Bar Tips below.


  Back to Top
 Customizing the Display of the Cursor
You can set the cursor or pointer to appear differently for different parts of the display. The control uses one cursor for locked cells (CursorType enumeration equal to Locked) and one cursor for unlocked cells (CursorType enumeration equal to Normal). The built-in hyperlink cell type by default uses the hand cursor over the link area. If you do not like the cursor supplied by a built-in cell type class then you could derive a class from the built-in cell type class and override the GetReservedCursor method.

  Back to Top
 Customizing the User Error Messages
You can set the error messages that display when the user performs invalid actions. To control the display of error messages, use the EditError event and the EditError enumeration.

  Back to Top
 Resetting Parts of the Control
You can easily and quickly reset various settings in the control back to default or original values:
  • Reset the control to its original state using the FpSpread class Reset method.

  • Reset the sheet to its original state using the SheetView class Reset method.

  • Reset the skin properties for a sheet or sheets using the DefaultSkins class Reset method.

  • Reset the value of a cell or the text in a cell to empty using the Cell class, ResetValue or ResetText method.

  • Reset the settings for rows or columns using the individual reset methods for each setting in the Row or Column class (ResetBackColor, etc.).

  • Reset all the named style properties to their default values using the NamedStyle class Reset method. There are also individual reset methods for each of the settings in a style (ResetBackColor, etc.).

  • Reset all the style settings in the StyleInfo object to the default settings using the StyleInfo class Reset method.


  Back to Top
 Allowing the User to Zoom
You can allow the user to change the scale of the display of the control, in other words to zoom in or zoom out. Use the AllowUserZoom property of the FpSpread control. This allows the user to zoom in or out by pressing the Ctrl key and turning the mouse wheel. The user can zoom in up to 400% and out to 10% of the default display. You can also programatically adjust the zoom.
Play Video play video

  Back to Top
 Adding a Context Menu to a Control
You can create a context menu and add it to the ContextMenu property of the FpSpread control. The control automatically displays this menu when you right click on the control.

Previous Customizing Interaction in the Overall Control Next

    
 Have a question?
Have a Question? Ask Us!
Subscribe to the RSS feed!RSS Subscribe
 

 
Learn about the new Roadshow now!

Tour Home
Overview
Appearance
User Interaction
Cell Types
Formulas
Managing Data
Data Binding
Import/Export
Printing
Keyboard Interaction
Shapes
Models
Spread Designer
 
Map

Copyright © 1991-2007 FarPoint Technologies, Inc. All rights reserved. All names are property of their respective owners.