Skip to content

DoadjustGridWidths - Grid

Called any time a grid is resized

Type: Procedure

Parameters

Parameter Type Description
iGuiDelta Integer The horizontal difference between the old and new grid size in GUI units

Syntax

Procedure DoadjustGridWidths Integer iGuiDelta

Call Example

Send DoadjustGridWidths iGuiDelta

Description

The DoAdjustGridWidths procedure is called any time a grid is resized, passing iGuiDelta as the horizontal difference between the old and new grid size in GUI units. If the value is positive, the grid is wider; if it is negative, it is smaller. By default, this method uses the properties peResizeColumn and piResizeColumn to determine how grid columns are resized. You could choose to replace this with a resizing mechanism of your own choosing.

For example, the following example resizes the first column within maximum (50) and minimum (10) limits.

Procedure DoAdjustGridWidths integer iGuiDelta
  integer iWidth
   // get current width of first column
   Get form_guiwidth 0 to iWidth
   // determine the new width
   Move (iWidth + iGuiDelta) to iWidth
   // if the new width is within a valid range, change it
   If (iWidth>=10 and iWidth<=50) Set form_guiwidth 0 to iWidth
End_procedure