Jeff,
Move that code to the Form.Resize() method. Then just call it
thisform.Resize() initially after the grid is constructed. After that every time the user resizes the form the grid will adjust.
>I have a form with nothing but a grid on it. I create the grid programatically and then set its width and height properties to the form's dimensions -20. in the resize event of the form, I put the same code:
>
> if type('thisform.grid1') = "o" and not isnull(thisform.grid1)
> thisform.grid1.visible = .f.
> thisform.grid1.height = thisform.height-20
> thisform.grid1.width = thisform.width-20
> thisform.grid1.visible = .t.
> endif
> thisform.refresh
>
>The first time I resized the form it looked like it worked. But now everytime I resize or maximize the form, the grid stays the same. Am I overlooking something here?