&& form.Keypress LPARAMETERS nkeycode,nshiftaltctrl if( chr(nkeycode) == 't' ) NODEFAULT local th, i, nlines, aa[1], OneLineHeight, EditBoxWidth th = thisform.TextHeight(thisform._edit.value) nlines = alines(aa, thisform._edit.value, .F.) acti screen ?'--' ?thisform._edit.Value ?'--' if( !empty(nLines) ) OneLineHeight = th/nlines acti screen ?th, OneLineHeight EditBoxWidth = thisform._edit.Width - iif(!empty(thisform._edit.Scrollbars), sysmetric(SYSMETRIC_VSCROLLBARWIDTH), 0) for i = 1 to nlines if( thisform.textwidth(aa[i]) > EditBoxWidth ) th = th + OneLineHeight endif endfor endif thisform._Edit.Height = max(th, 45) && or scrollbars disappear acti screen ?th else return DoDefault(nkeycode,nshiftaltctrl) endif