LPARAMETERS nKeyCode, nShiftAltCtrl do case case nKeyCode = asc(' ') NODEFAULT if( !empty(this.ControlSource) ) push key on key label F7 keyboard '{CTRL+W}' && eg F7 to save on key label TAB keyboard '{CTRL+W}' && or TAB to save local _form _form = iif(type('thisform') == T_OBJECT, thisform.Name, 'screen') if( this.ReadOnly ) modify memo (this.ControlSource) NOEDIT NOMENU in (_form) else modify memo (this.ControlSource) NOMENU in (_form) endif pop key endif endcase(2) put an editbox in the grid (for memo fields, this is), set the column.Sparse to .F. Now you can see the contents (at least the first line) of the memo, or more depending on the rowHeight of the grid
do case case nKeyCode = asc(' ') local ac ac = thisform.GetActiveControl() if( !isNull(ac) ) if( ac.BaseClass == 'Editbox' ) if( ac.Parent.BaseClass = 'Column' ) if( !empty(ac.ControlSource) ) push key on key label F7 keyboard '{CTRL+W}' && eg F7 to save on key label TAB keyboard '{CTRL+W}' && or TAB to save local _form _form = iif(type('thisform') == T_OBJECT, thisform.Name, 'screen') if( ac.ReadOnly ) modify memo (ac.ControlSource) NOEDIT NOMENU in (_form) else modify memo (ac.ControlSource) NOMENU in (_form) endif pop key endif endif endif endif endcase
&& GetActiveControl lparameters DoNotGoDownIfGrid local _ActiveControl, _ActiveColumn, i, x if( type('thisform.ActiveControl') == T_UNDEFINED ) return .Null. else _ActiveControl = thisform.ActiveControl endif if( !(type('_ActiveControl') == T_OBJECT ) ) suspend endif if( !DoNotGoDownIfGrid and (Proper(_ActiveControl.BaseClass) == 'Grid') ) _ActiveColumn = _ActiveControl.ActiveColumn if( !empty(_ActiveColumn) ) for i = 1 to _ActiveControl.ColumnCount x = _ActiveControl.Columns[i] if( x.ColumnOrder == _ActiveColumn ) exit endif endfor for i = 1 to x.ControlCount if ( x.Controls[i].Name == x.CurrentControl ) _ActiveControl = x.Controls[i] exit endif endfor endif endif return _ActiveControl