FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Mr. Rao xBrowse possível Melhoria
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Mr. Rao xBrowse possível Melhoria
Posted: Mon Aug 25, 2014 02:25 PM
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.

Code (fw): Select all Collapse
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
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: Mr. Rao xBrowse possível Melhoria
Posted: Wed Aug 27, 2014 04:23 PM

up

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin

Continue the discussion