FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problems with Button activation
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Problems with Button activation
Posted: Tue Jan 27, 2009 09:01 PM

I have a problem with the following code that is not activing a button when checkbox is clicked.

REDEFINE CHECKBOX aGet[71] VAR lActive ID 163 OF oFld:aDialogs[1] WHEN lAcctAdmin ;
VALID( aGet[72]:Refresh(), oDlg:Update(), .T. )

REDEFINE BUTTON aGet[72] ID 1 OF oDlg UPDATE ACTION ( lSave := .t. , oDlg:End() ) WHEN lActive

I would appreciate your assistance.

Thank You,

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Problems with Button activation
Posted: Wed Jan 28, 2009 01:01 AM
Hello,

Using a Checkbox and start a action :
( the checkbox closes the dialog )

REDEFINE CHECKBOX  lCheck  ID 300 OF oDlg5 ;
ON CHANGE oButton:Click() 

REDEFINE BUTTONBMP oButton  ID 30 OF oDlg5 ;
ACTION oDlg5:End() ;
BITMAP "Quit" PROMPT "   Exit" TEXTRIGHT


Regards
uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: Problems with Button activation
Posted: Wed Jan 28, 2009 01:06 AM

Hola,

you can use oDlg:aEvalWhen() in the checkbox´s VALID or ON CHANGE
regards

Marcelo

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Problems with Button activation
Posted: Thu Jan 29, 2009 08:25 AM
cdmmaui wrote:I have a problem with the following code that is not activing a button when checkbox is clicked.

REDEFINE CHECKBOX aGet[71] VAR lActive ID 163 OF oFld:aDialogs[1] WHEN lAcctAdmin ;
VALID( aGet[72]:Refresh(), oDlg:Update(), .T. )

REDEFINE BUTTON aGet[72] ID 1 OF oDlg UPDATE ACTION ( lSave := .t. , oDlg:End() ) WHEN lActive


I think, you can´t use the valid clause for this, use ON CHANGE to activate the button

REDEFINE CHECKBOX aGet[71] VAR lActive   ID 163  OF oFld:aDialogs[1]  WHEN lAcctAdmin ;
      ON CHANGE ( aGet[72]:Refresh(), oDlg:Update() )
kind regards

Stefan

Continue the discussion