Problem with BUTTONBAR

Problem with BUTTONBAR

Postby Dorneles » Sun Jan 04, 2009 4:32 am

The BUTTONBAR does not update the Gets, but if you use another toobar it updates, which can be wrong?

Image

Code: Select all  Expand view

DEFINE DIALOG oDlgD RESOURCE 3000 TITLE "Controle de Contas a Pagar"

  REDEFINE PAGES oPag ID 102 OF oDlgD ;           
               DIALOGS 3001, 3002
               
  REDEFINE TABS oTabs ID 104 OF oDlgD ;
             PROMPT "&Emissão C.C.P.   ", "Consulta C.C.P.   " ;
             ACTION ({oPag:setoption(oTabs:nOption)})                 
             oDlgD:oTop = oTabs

   REDEFINE DTPicker oGetCCP.dataccp    VAR aGetCCP.dataccp       ID 4004           OF oPag:aDialogs[ 1 ]                            WHEN lDisable                

ACTIVATE DIALOG oDlgD CENTERED ON MOVE(oDlgD:Center) ON INIT ( CriaBarTar1( oDlgD,oPag:aDialogs[ 1 ] ,@aGetCCP,oGetCCP ))   

dbCloseall()
oDlgD:End()
Release All
SysRefresh()

RETURN(.T.)
////////////////////////////////////////////////////////////////////////////////
STATIC FUNCTION CriaBarTar1( oDlgD,oPag1,aGetCCP,oGetCCP )
////////////////////////////////////////////////////////////////////////////////
  LOCAL oBar, oButDlg[11]
 
 
   DEFINE BUTTONBAR oBar Size 54,46 Of oPag1 3D Top 2007
         
          DEFINE BUTTON oButDlg[1] OF oBar                 ;
                 RESOURCE "PRIMEIRO"                       ;
                 PROMPT "primeiro"                           ;
                 MESSAGE "Primeiro Registro"               ;
                 TOOLTIP "Primeiro Registro"               ;
                 ACTION (Primeiro(@aGetCCP,oGetCCP,@lEOF,@lBOF,oPag:aDialogs[ 1 ]),oPag:aDialogs[ 1 ]:Update(),oPag:aDialogs[ 1 ]:aEvalWhen(),oDlgD:Update()) WHEN lBotao .AND. lEOF


oBar:bRClicked := { || nil }

RETURN(.T.)
////////////////////////////////////////////////////////////////////////////////
STATIC FUNCTION Primeiro(aGetCCP,oGetCCP,lEOF,lBOF,oPag1)
////////////////////////////////////////////////////////////////////////////////

  Select CCP
  Set ORDE TO 1
  //
  lEOF := .T.
  lBOF := .T.
  //
  GO TOP
  aGetCCP := InitData()
  //
  lEOF := .F.
  //
  RefreshObj(aGetCCP,oGetCCP)
  //
  RETURN(.T.)
////////////////////////////////////////////////////////////////////////////////

Dorneles
 
Posts: 30
Joined: Mon Oct 30, 2006 2:39 pm
Location: Brasil

Re: Problem with BUTTONBAR

Postby Daniel Garcia-Gil » Sun Jan 04, 2009 4:59 am

use UPDATE clause

REDEFINE DTPicker oGetCCP.dataccp VAR aGetCCP.dataccp ID 4004 OF oPag:aDialogs[ 1 ] WHEN lDisable UPDATE
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Problem with BUTTONBAR

Postby Dorneles » Sun Jan 04, 2009 5:09 am

Hello Daniel.
Thanks for the tip. But the problem continues.
Dorneles
 
Posts: 30
Joined: Mon Oct 30, 2006 2:39 pm
Location: Brasil

Re: Problem with BUTTONBAR

Postby Daniel Garcia-Gil » Sun Jan 04, 2009 5:56 am

try update DTPicker Object value for this way

oGetCCP.dataccp:cText( NewValue )
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Problem with BUTTONBAR

Postby Dorneles » Sun Jan 04, 2009 6:29 am

Now it worked. Thank you!
Dorneles
 
Posts: 30
Joined: Mon Oct 30, 2006 2:39 pm
Location: Brasil

Re: Problem with BUTTONBAR

Postby Daniel Garcia-Gil » Sun Jan 04, 2009 6:30 am

:D
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 107 guests