CGridView:Optimize


The Optimize method adjusts column widths to accommodate their cell contents. This method differs from BestFit by disregarding column visibility inside the grid window.

Syntax

CGridView:Optimize( nCol )

CGridView:Optimize( nColMin, nColMax )

bullet.gif    Where nCol is the column to optimize.

bullet.gif    Alternatively, nColMin and nColMax are the minimum and maximum columns to optimize.

Example

The following script adjusts the grid to best fit the view between columns 1 and 8:

G = attach_gridview()

-- attach the top-most grid window

G:Optimize(5,7)

-- optimize the width of columns 5 through 7

Related Topics

CGridView class

BestFit


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.