- Context menu of Spreadsheet control
- Toolbar and formula bar
- Formula bar
- Entering values and formulas
- Manage cells
- Managing worksheets
Automatic Application Features (AAF) of Spreadsheet controls
The Spreadsheet control multiple several Automatic Application Features (AAF) in order to simplify the use of the control.
The main AAFs affect:
Context menu of Spreadsheet control
Each Spreadsheet control found in a window proposes a menu to the user.
This menu, available without programming, includes several actions:
- Cancel/Restore the last action.
- Cut/Copy/Paste: These options can be applied to a cell, a column, a row or a selection of cells.
- Cancel zoom: This option is used to cancel the zoom performed by Ctrl + Mouse Wheel for example.
- Insert: This option is used to insert a row or a column.
- Delete: This option is used to delete the content from a cell, row or column. Caution: the entire content is immediately deleted (value, formula, ...).
- Save as: This option is used to save the content of Spreadsheet control in a new xlsx file.
Remark: You can add options to this menu from the code. To do so, use the ContextMenu
The context menu of Spreadsheet control can be disabled. To configure the display of context menu associated with the Spreadsheet control, you must:
- Open the Spreadsheet control description window.
- Select the "UI" tab.
- Choose the desired menu in the "Context menu" combo box. You can:
- "Display the AAF menu (System)": In this case, the automatic menu of Spreadsheet control will be displayed. For more details on how to configure this menu, see Configuring the AAF menu.
- "Add a context menu": If this option is checked, you can select the custom context menu to be displayed.
- If both options are checked, the custom context menu can be added before or after the AAF menu.
- If no option is selected, no context menu will be selected. The <Disabled> option will be displayed in the description window.
- The ContextMenu property is also used to remove the AAF-specific context menu and restore the standard Windows menu for a given control.
- Some specific options can be disabled by AAFDisable.
The Spreadsheet control includes a toolbar and a formula bar.
The toolbar allows the end user to perform the most common formatting operations:
- Font name
- Font size
- Zoom of the selection
- Formatting of the cell: Bold, Italic, Underline, Strikethrough
- Border and color of the border
- Background color
- Text color
- Text alignment: Aligned left, Centered, Aligned right
- Merge of cells
- Cell format
The formula bar allows the end user to identify the selected cells and to enter the formula or the value associated with a cell.
Two buttons are used to validate or cancel the input.
Remark: A formula starts with '='. When typing the '=' sign, all the available functions are displayed in the formula. To use a function, all you have to do is select it.
Entering values and formulas
The input of values and formulas is performed:
- in the cell directly.
- in the formula bar of current cell if this one is visible.
Remark: If the Spreadsheet control allows the input of values, the end user will have the ability to add, modify or delete values in the cells. The end user can also add rows and columns. To allow the input of values:
- in the editor: "Allow the input of values" option in the "Details" tab of control description.
- programmatically: InputValue property.
A formula always starts with '='. A formula can include:
- a function,
- one or more cells coming from the current worksheet or from another worksheet. To reference a cell in a calculation, all you have to do is click the requested cell: the name of the cell is displayed in the formula bar.
The Spreadsheet control allows you to:
- Select a cell.
- Select a range of cells.
- Select several cells.
The different toolbar options can be applied to these cells.
You can also:
- create formulas containing different cells.
- copy cells. For example:
- Select a cell containing a value or a formula.
- Select the copy handle (square at the bottom of selection) and move this handle: The initial value is copied into the selected cells
- perform an incremental copy of a group of cells. For example:
- Select two vertical cells containing two values of a series ("1" and "2" for example).
- Select the copy handle (square at the bottom of selection) and move this handle to the bottom: the different values of the selected cells are updated.
The Spreadsheet control can be multi-worksheet and manage the different worksheets of an xlsx file.
In this case:
- The different worksheets are displayed at the bottom left of Spreadsheet control. The "+" button is used to add new worksheets.
- A context menu allows end users to manage the different worksheets: You can:
Remark: The options of this menu can be configured like the context menu of Spreadsheet control.
- Insert a worksheet.
- Delete the current worksheet.
- Rename the current worksheet.
- Protect the current sheet.
Tip: If several worksheets are displayed, you have the ability to scroll the different tabs corresponding to the worksheets via the arrow buttons.
- To display the tab of first worksheet, press Ctrl + click on the left arrow.
- To display the tab of last worksheet, press Ctrl + click on the right arrow.