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.
CGrid:BestFit()
CGrid:BestFit( nColMin, nColMax )
CGrid:BestFit( nColMin, nColMax, nRow )
Where nColMin is the lowest column and nColMax is the highest column to fit. If not specified, all columns are used.
nRow is the row to use for fitting over the column range.
The following script adjusts the grid to best fit the view between columns 1 and 8:
|
-- create CGrid with properties in GridParams |
-- fill the grid with data |
|
|
-- adjusts the widths of columns 1 though 8 |
CGrid class, Optimize, OptimizeRange
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.