IntelliZoom, Zoom() and ZoomFactor in TAdvStringGrid

Hi,

I am trying to implement zoom feature where I use a trackbar to control zooming of a TAdvStringGrid.

I want this to work in conjunction with the IntelliZoom feature.

I cannot, however find any correlation between the Zoom() and the ZoomFactor ?

For instance. I set Zoom(-10) and the ZoomFactor is now -20 ?

Also, if I set Zoom(0) the ZoomFactor does not change? How can I reset to "100%" ?

Therefore it seems impossible to set a trackbar value in the OnIntelliZoom event as the ZoomFactor and trackBar.Position are out of synch.

Any help in this regard would be appreciated.

I've realised that Zoom() is incremental, so it's more like a "ZoomBy" method.

I also realise I can set ZoomFactor directly - however this only seems to alter the font size, not the cell size ??

I've implemented my own font size adjustment.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.

To reset the intellizoom or programmatic zoom (with grid.Zoom()), you can call at all times:
grid.Zoom(-grid.ZoomFactor);

1 Like