I have received several private requests from members of this and other forums to list some of the new features that will appear in release 6.0 of the APLGrid object and have neglected doing so for too long. But here we go... finally :-)
The following unordered list (another way of saying that is "off the top of my head") recalls the most important new features. I apologize for the informality:
- Scatter-point indexing has been added to allow you to reach cells in random locations (non rectangular and non contiguous) in a single WI call rather than having to iterate. Rather than specifying a vector of indexes in the Rows and Cols arguments you instead specify a two-column matrix in the first argument (Rows) and a "missing value" second argument (Cols). This denotes a request for indexing using a scattered rather than rectangular set of cells in the grid. This also works in three dimensions for the xImage property (but in that case you specify a three-column matrix of indexes in the first (Places) argument and use a "missing value" in the 2nd and 3rd argument). Scatter-point indexing works for both setting and referencing of properties.
- Scatter-point indexing is especially useful in combination with the new xChanges property. It returns a two-column matrix of cell indexes for all cells that have changed due to user input. You can therefore easily find all changed cells when saving the grid and you only have to reference their values (rather than checking the values of all cells). You can clear the changed flag of all cells by setting xChanges to an empty numeric matrix or vector. This works nicely if the users does a Save of changes. You can clear the changes flags and then continue allowing user to browse and edit the cells.
- Grid virtualization allows very large grid sizes (in excess of 10 million cells) to be handled efficiently. If works with two new properties (xVirtualMode and xVirtualParts) and one new event (onXVirtualLoad). The event is fired whenever cell values are needed for display or for printing, clipboard, or xml operations. But for cells that are not accessed their values never need to be loaded.
- Row defaults have been added. You have always been able to set default values for the grid page or for specific column. In this release I also added Row defaults so that you can specify attributes for all cells in a row. One use for this is to highlight exceptional rows with a change in background color or other attribute.
- Support has been added for clipboard cut, copy, and paste. And this is fully integrated with virtual mode.
- There is also support for "replication mode" which looks similar to excel's "fill mode" where you drag on the lower-right corner of the selection and can extend it to fill elements. We do not provide a default action but instead fire an event (onXReplEnd) that you can handle to perform any kind of "replication" action you wish.
- Printing has also been substantially improved and simplified. You can now make a named association with an APL printer object and the grid will automatically handle printing all pages and doing page ejects between them.
- Printing now supports much better scaling options including a xPrintZoom factor that lets you specify relative scaling between the screen and printer sizes (in the past the default was one logical inch on screen was mapped to one logical inch on printer and there was no override). the xPrintZoom allows you to get any scaling you want for printing including fitting all selected cells to page, all selected columns to page, or all selected rows to page.
- Print preview has also been refined and properly documented.
- During potentially long running operations in large virtual grids (such as printing, cut/copy/paste of huge blocks of cells, and production of XML output) progress tracking events are fired that make it trivial to display progress gauges including cancel button.
- Numeric values stored into cells programmatically sometimes lost precision due to rounding errors. That's because they were stored internally in formatted text format rather than as numbers. This has been changed so that if you set a numeric value into a cell that will be exactly the value you get back when referencing the cell unless the user edits the cell value (in which case we have to evaluate the user's input which is subject to rounding errors).
- The xProtect property has been enhanced to allow more options for controlling how much protection applies to a cell. You can protect a cell but allow mouse and keyboard events to be fired. And you can allow a protected cell to be part of a selection rectangle when the DELETE key is pushed without it preventing other cells from being cleared.
Pat