FarPoint Technologies
(800) 645-5913
fpsales@fpoint.com
|
|
Allow Users to Drag and Drop
Cells | Allow Users To Sort
Columns | Display Scroll Bars Only When
Needed | Display Scroll Tips
| Specify the Pointer | Display Text Tips | Provide Cell Notes | Customize the Enter Key Action | Turn Off the Clipboard Shortcut Keys | Specify When Buttons Appear
Back to Top
You can specify whether the user can select
a cell or range of cells and drag and drop them to a new location in the same
spreadsheet.
The following example allows the user to move or copy the
contents of a cell or a block of cells using the drag-and-drop
operation.
fpSpread1.AllowDragDrop = True |
 |
|
Back to Top
You can specify whether the user can sort
columns in ascending or descending order when they click a column header. You
can specify whether a sort indicator appears in the column header to show what
type of sort has occurred. Sorting toggles between ascending and descending
with each click.
The following example allows the user to automatically
sort by clicking on the desired column header.
fpSpread1.UserColAction = UserColActionSort
For i = 1 To fpSpread1.MaxCols
fpSpread1.Col = i
fpSpread1.ColUserSortIndicator(i) = ColUserSortIndicatorAscending
Next i |
 |
|
Back to Top
By default, the spreadsheet displays the
scroll bars you specified for it to display at all times. Alternatively, the
control can display scroll bars only when the size of the spreadsheet is larger
than the size of the view.
The following example hides the scroll bars
when the maximum number of rows or columns fit in the control
boundaries.
fpSpread1.ScrollBarExtMode = True |
 |
|
Back to Top
You can make scroll tips display when the
user moves the horizontal or vertical scroll box or both. The scroll tip
displays "Column: nn" on the horizontal scroll bar and "Row: nn" on the
vertical scroll bar, where "nn" is the column or row designation.
The
following example displays the scroll tips for the vertical column
only.
fpSpread1.ShowScrollTips = ShowScrollTipsVertical |
 |
|
Back to Top
You can specify the pointer to display for
different areas of the spreadsheet. You can choose one of four pointers
(default pointer, arrow, column resize, or row resize). If you are using the
ActiveX control, you can define a custom icon to display as the pointer.
The following example changes the cursor to an arrow when the mouse is
over the column headers.
fpSpread1.CursorType = CursorTypeColHeader
fpSpread1.CursorStyle = CursorStyleArrow |
 |
|
Back to Top
The fpSpread control provides text tips
that can be displayed for any header or any cell in the control. Text tips are
displayed in ToolTip windows for the header or cell that is under the
pointer.
The following example initializes the text tip display. Custom
text can be displayed using the TextTipFetch event.
fpSpread1.TextTip = TextTipFixed
fpSpread1.SetTextTipAppearance "MS Sans Serif", 14, 0, 0, &HC0FFFF, &H0&
|
 |
|
Back to Top
You can attach a note to a cell to contain
text such as a comment, a question, or documentation describing the origin of
the cell's value. A cell with a note attached displays a small red square (cell
note indicator) in the upper right corner of the cell.
The following
example attaches a note to cell B1.
fpSpread1.Row = 1
fpSpread1.Col = 2 fpSpread1.cellnote = "This is a cell note" |
 |
|
Back to Top
You can control where the focus rectangle
moves (up, down, left, right, next cell, previous cell, or first column of the
next row) when the user presses the Enter key when edit mode is on. You can
also specify that the focus rectangle stays at the same cell. .
The
following example moves the active cell down when the user presses the Enter
key.
fpSpread1.EditEnterAction = EditEnterActionDown |
|
|
Back to Top
Users can use Clipboard shortcut keys to
cut (Ctrl+X or Shift+Del), copy (Ctrl+C or Ctrl+Ins), and paste (Ctrl+V or
Shift+Ins) data in the spreadsheet. If you prefer, you can turn off these
Clipboard shortcut keys.
The following example turns off the Clipboard
shortcut keys.
fpSpread1.AutoClipboard = False |
|
|
Back to Top
When you use combo boxes, buttons, or spin
buttons in cells, you can specify when the spin button (in date, integer, or
time cells), button, or drop-down arrow (in combo box cells) displays: always,
only in the current cell, only in the current column, only in the current row,
always in button cells, or always in combo box cells.
You might want to
hide buttons to keep your spreadsheet from looking cluttered. For example, if
your spreadsheet has an entire column of combo box cells, you might want to
display the drop-down button only in the current cell.
The following
example displays buttons only in the current active row.
fpSpread1.ButtonDrawMode=
SS_BDM_CURRENT_ROW |
 |
|
|
|
| Have a question? |
|
 |
|