CGrid:OptimizeRange
The OptimizeRange method adjusts column widths to accommodate their cell contents over a range of columns. This method differs from BestFit by disregarding column visibility inside the grid window.
CGridView:OptimizeRange( nColMin, nColMax )
Where nColMin and nColMax are the minimum and maximum columns to optimize.
The following script adjusts the grid to best fit the view between columns 1 and 8:
|
-- create a CGrid object |
-- assemble the grid |
|
|
-- optimize the width of columns 5 through 7 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.