In this example, the AfterLineLostFocus event procedure “shrinks” the grid in the Invoice Entry window when the user moves to the next line. To do this, it programmatically “clicks” the grid’s expand button:
Private Sub Grid_AfterLineLostFocus() InvoiceEntry.ScrollingWindowExpandButton = 1 End Sub