Problems with Button activation

Problems with Button activation

Postby cdmmaui » Tue Jan 27, 2009 9: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,
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Problems with Button activation

Postby ukoenig » Wed Jan 28, 2009 1:01 am

Hello,

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

Code: Select all  Expand view

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 :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Problems with Button activation

Postby Marcelo Via Giglio » Wed Jan 28, 2009 1:06 am

Hola,

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

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: Problems with Button activation

Postby StefanHaupt » Thu Jan 29, 2009 8: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

Code: Select all  Expand view
REDEFINE CHECKBOX aGet[71] VAR lActive   ID 163  OF oFld:aDialogs[1]  WHEN lAcctAdmin ;
      ON CHANGE ( aGet[72]:Refresh(), oDlg:Update() )
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests