Recent

Author Topic: Optimal Height/Width functionality  (Read 156 times)

backprop

  • Jr. Member
  • **
  • Posts: 90
Optimal Height/Width functionality
« on: September 02, 2024, 12:33:11 pm »
Is there Optimal Height/Width functionality for selected column/row?

I'm using this quite a bit in LibreOffice Calc, due quite different length of the data. And now I would need to know is it possible to do that from the code.

wp

  • Hero Member
  • *****
  • Posts: 12280
Re: Optimal Height/Width functionality
« Reply #1 on: September 02, 2024, 12:45:05 pm »
Is there Optimal Height/Width functionality for selected column/row?
As far as the elemental non-visual library FPSpreadsheet is concerned: no, because this library does not know about the metrics of the fonts. However, when you use the visual TsWorksheetGrid, there are functions AutoColWidth(ACol: Integer) and AutoRowHeight(ARow: Integer). But note that after opening the saved files in Calc these auto-determined sizes can be off by a few pixels because Calc and Excel add some margin to the cell dimension, and I did not find out how this is calculated.

 

TinyPortal © 2005-2018