dxSpreadSheetBestFitWidthCorrectionPercentage Constant
Specifies the extra width (as a percentage of the content width) added to cells with unformatted string values during best fit calculations.
Declaration
const dxSpreadSheetBestFitWidthCorrectionPercentage: Single = 0;
Returns
Type | Description |
---|---|
Single | The percentage of the longest cell content length in a column that a row‘s ApplyBestFit procedure adds to the calculated width of the column. The recommended value is |
Remarks
A row’s ApplyBestFit procedure may reserve less space than necessary to fit unformatted text when the active worksheet’s Options.ZoomFactor property value differs from 100
. This issue may occur because standard WinAPI routines zoom unformatted text in steps, and the ApplyBestFit procedure calculates the target width based on the current zoom factor property value that can change gradually. As a result, an unformatted string’s length can exceed the calculated column width due to certain combinations of cell font settings, content length, and the current zoom factor.
The ApplyBestFit procedure adds the dxSpreadSheetBestFitWidthCorrectionPercentage
global constant value to calculated widths of all cells that contain unformatted text. You can change the constant value to increase calculated cell widths by a percentage of the corresponding unformatted content widths. The recommended dxSpreadSheetBestFitWidthCorrectionPercentage
global constant value is 2
.
Note
Content calculation routines do not rely on font scaling mechanisms of the operating system for formatted text. The dxSpreadSheetBestFitWidthCorrectionPercentage
global constant has no effect on cells with RTF content, and the ApplyBestFit procedure always calculates their widths precisely.