CGrid:BestFit


The BestFit method adjusts the column widths for best fit inside the visible portion of the grid window. If the optional row is specified, the contents of that row are used for fitting. Otherwise, all rows are considered for fitting.

Syntax

CGrid:BestFit()

CGrid:BestFit( nColMin, nColMax )

CGrid:BestFit( nColMin, nColMax, nRow )

bullet.gif    Where nColMin is the lowest column and nColMax is the highest column to fit. If not specified, all columns are used.

bullet.gif    nRow is the row to use for fitting over the column range.

Example

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

G = new_grid(GridParams)

-- create CGrid with properties in GridParams

-- fill the grid with data

 

G:BestFit(1,8)

-- adjusts the widths of columns 1 though 8

Related Topics

CGrid class, Optimize, OptimizeRange

 


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