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.

Syntax

CGridView:OptimizeRange( nColMin, nColMax )

bullet.gif    Where 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 = new_grid()

-- create a CGrid object

-- assemble the grid

 

G:OptimizeRange(5,7)

-- optimize the width of columns 5 through 7

Related Topics

CGrid class, BestFit


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