headersize not fixed

ComponentPack / TAdvStringGrid v8.0.0.0 Berlin 10.1 C++

The app prints header info then grid data,  The grid can have varying column width, depending on user, so we fit it to the page.

First calculate and set the headersize (in MM_LOMETRIC) in PrintSettings->HeaderSize.

then, to fit on the page:

PrintSettings->FitToPage = fpShrink

Then print via:

I find that the actual printed headersize changes with the amount of shrink scaling, and the grid can overwrite the text in the header.

How to force headersize constant, regardless of grid shrinkage?



It is by design that the header size scales along with the scaling that is applied when a shrink is done. Typically the font is scaled so that makes the header font also smaller.
I could not see an issue here with overlap of the grid (when headersize is configured this way that the grid also does not overlap when no scaling is happening)

Thanks, but I do not understand how the header font can get scaled.  The header is printed on the printer canvas first, the headersize calculated from header fonts, then the grid is printed.  So the grid scaling is not known when the header is printed.

Shrinking the headersize after the user sets it to a specific value seems like a defect.  How would one print logos and similar that must be the same size, regardless of grid scaling?

Is there another way to locate the grid vertically on the printed page?


When printing, the first thing that happens is size calculations. Before the header or grid starts printing, the required size, nr. of pages as result, scaling ... is calculated.

When there is scaling, it is now also applied to the header to keep font sizes in sync.
I understand your remark and it makes sense too. So, we'll look to add a property to control this.