WITH This .SaveOriginalDimensions() DO CASE CASE UPPER( .Parent.BaseClass ) = 'COLUMN' *** If this is the CurrentControl in a grid column, we must expand the current grid cell before *** expanding the edit box .ExpandGridCell() .Height = .Parent.Parent.RowHeight .Width = .Parent.Width CASE UPPER( .Parent.BaseClass ) = 'PAGE' *** This is also a special case because pages do not have a height property. The pageframe *** has a PageHeight property, so we have to use that to expand the edit box .Top = 0 .Left = 0 .Height = .Parent.Parent.PageHeight .Width = .Parent.Parent.PageWidth .zOrder(0) && Make sure the edit box appears on top of the other objects OTHERWISE .Top = 0 .Left = 0 .Height = .Parent.Height .Width = .Parent.Width .zOrder(0) && Make sure the edit box appears on top of the other objects ENDCASE .lMaximized = .T. ENDWITHThis is the code that expands the grid cell:
LOCAL lnCol WITH This.Parent FOR lnCol = 1 TO .Parent.ColumnCount .Parent.Columns[lnCol].Width = 0 ENDFOR .Width = .Parent.Width .Parent.RowHeight = .Parent.Height - .Parent.HeaderHeight INKEY( .2 ) *** Now scroll the grid to make the current row the one that is visible in the grid DO WHILE .Parent.RelativeRow # 1 .Parent.DoScroll(1) ENDDO ENDWITHMarcia