On Wed, 5 Nov 2014, Werner Pamler wrote:

For fpspreadsheet I would like to implement the feature of Excel or Libre/OpenOffice that multiple cell ranges can be selected. The grid component in this package, TsSpreadsheetGrid, currently can select only a single range (if goRangeSelect is in the grid's Options) due to its inheritance from TCustomGrid.


Recompiling the package LCLBase fails with the error: "Property can't have a default value". I think this message is misleading and confusing because the true issue seems to me that the set of TGridOptions now contains 33 elements. In my understanding, the elements of a set correspond to the bits of an integer. In a 32-bit OS, therefore, a set can only contain 32 elements - there is one too many now...

Is this interpretation correct?

Yes.


OK, here I could circumvent this issue by introducing a new boolean property "MultiSelect" which is evaluated when goRangeSelect is active. Maybe this is even better than the goMultiSelect option because it bypasses the conflict with goRangeSelect.

But what if I would not have this possibility? Is there a way to extend the set to more than 32 elements? If not, split the Options into groups of options like VirtualTreeView does? I fear the options of the grid components will require a major redsign soon.

The 32-bit limit cannot be circumvented easily. It would require a major redesign of streaming and rtti. Your fastest path is splitting the options.

Michael.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to