Problem with BUTTONBAR

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

Problem with BUTTONBAR

Post by Dorneles »

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

Image

Code: Select all


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.)
////////////////////////////////////////////////////////////////////////////////

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

Re: Problem with BUTTONBAR

Post by Daniel Garcia-Gil »

use UPDATE clause

REDEFINE DTPicker oGetCCP.dataccp VAR aGetCCP.dataccp ID 4004 OF oPag:aDialogs[ 1 ] WHEN lDisable UPDATE
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Dorneles
Posts: 30
Joined: Mon Oct 30, 2006 2:39 pm
Location: Brasil

Re: Problem with BUTTONBAR

Post by Dorneles »

Hello Daniel.
Thanks for the tip. But the problem continues.
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Problem with BUTTONBAR

Post by Daniel Garcia-Gil »

try update DTPicker Object value for this way

oGetCCP.dataccp:cText( NewValue )
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Dorneles
Posts: 30
Joined: Mon Oct 30, 2006 2:39 pm
Location: Brasil

Re: Problem with BUTTONBAR

Post by Dorneles »

Now it worked. Thank you!
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Problem with BUTTONBAR

Post by Daniel Garcia-Gil »

:D
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Post Reply