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.
CGridView:Optimize( nCol )
CGridView:Optimize( nColMin, nColMax )
Where nCol is the column to optimize.
Alternatively, 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:
|
-- attach the top-most grid window |
|
-- optimize the width of columns 5 through 7 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.