Caso esteja em uma coluna EDITÁVEL do xbrowse e em edição clique em um botão, o conteúdo da edição era perdido.
Solução:
obrw:lAutoSave:=.t.
xbrowse.prg
static function EditGetLostFocus( oGet, hWndFocus, oBrw, oEditGet, oCol )
local oWnd
// focus goes to another control in the same application, and not to the browse
if ( oWnd := oWndFromHwnd( hWndFocus ) ) != nil .and. ! ( oWnd == oBrw ) .and. ;
Upper( oWnd:ClassName() ) != "TGET"
oBrw:CancelEdit()
SetFocus( hWndFocus )
//para executar o botão quando este receber o foco de uma coluna com lAutoSave habilitado
if oWnd:className() $ 'TBUTTON/TSBUTTON/TBUTTONBMP/TBTNBMP' .and. oCol:lAutoSave
oWnd:click()
endif
return nil
endif