Greetings,
I have this issue...
LOCA cId:= SPAC(10), cPassword:= SPAC(10)...
@ 74,180 GET cId PIXEL ON CHANGE oBtn:Refresh()
@ 85,180 GET cPassword PASSWORD PIXEL ON CHANGE oBtn:Refresh()
@ 102, 85 BUTTON oBtn PROMPT '&Start' WHEN ( !EMPTY( cId ) .AND. !EMPTY( cPassword ) ) ACTION ( ValidInfo( cId, cPassword ) )
...
happen that the button oBtn start disable because cId and cPassword are empties, but if I write in cId and start to write in cPassword, oBtn remain disable and I can't send the proper code to enable. I try with ( oBtn:Refresh(), .T. ), ( oDlg:Refresh(), .T. ), ( SysRefresh(), .T. ), etc... oBtn only updates to enable when cId or cPassword lost focus.
What code is proper in the ON CHANGE method to update state in the BUTTON..?
Thank you for your help...
ON CHANGE's GET method update BUTTON
ON CHANGE's GET method update BUTTON
Saludos / Greetings
Jair A. Linares
FWH 13.07/ Harbour 3.2.0 dev (r1306132159)/ Borland C++ 5.82 / UEStudio 9.20/ Help&Manual 5
jair.linares71@gmail.com
Jair A. Linares
FWH 13.07/ Harbour 3.2.0 dev (r1306132159)/ Borland C++ 5.82 / UEStudio 9.20/ Help&Manual 5
jair.linares71@gmail.com
-
- Posts: 1033
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia
Re: ON CHANGE's GET method update BUTTON
fusion wrote:Greetings,
I have this issue...
LOCA cId:= SPAC(10), cPassword:= SPAC(10)...
@ 74,180 GET cId PIXEL ON CHANGE oDlg:aEvalWhen()
@ 85,180 GET cPassword PASSWORD PIXEL ON CHANGE oDlg:aEvalWhen()
@ 102, 85 BUTTON oBtn PROMPT '&Start' WHEN ( !EMPTY( cId ) .AND. !EMPTY( cPassword ) ) ACTION ( ValidInfo( cId, cPassword ) )
...
happen that the button oBtn start disable because cId and cPassword are empties, but if I write in cId and start to write in cPassword, oBtn remain disable and I can't send the proper code to enable. I try with ( oBtn:Refresh(), .T. ), ( oDlg:Refresh(), .T. ), ( SysRefresh(), .T. ), etc... oBtn only updates to enable when cId or cPassword lost focus.
What code is proper in the ON CHANGE method to update state in the BUTTON..?
Thank you for your help...
Re: ON CHANGE's GET method update BUTTON
thank you Marcelo for your response, but it doesn't work...
I try with...
ON CHANGE oDlg:aEvalWhen()
ON CHANGE ( oDlg:aEvalWhen() )
ON CHANGE ( oDlg:aEvalWhen(), .T. )
ON CHANGE ( oDlg:aEvalWhen(), SysRefresh() )
ON CHANGE ( oDlg:aEvalWhen(), oDlg:Refresh() )
ON CHANGE ( oDlg:aEvalWhen(), oBtn:Refresh() )
ON CHANGE ( oDlg:aEvalWhen(), oBtn:Refresh(), oDlg:Refresh() )
ON CHANGE ( oDlg:aEvalWhen(), oDlg:Refresh(), oBtn:Refresh() )
and the button remain disable with the cId and cPassword filled...
I try with...
ON CHANGE oDlg:aEvalWhen()
ON CHANGE ( oDlg:aEvalWhen() )
ON CHANGE ( oDlg:aEvalWhen(), .T. )
ON CHANGE ( oDlg:aEvalWhen(), SysRefresh() )
ON CHANGE ( oDlg:aEvalWhen(), oDlg:Refresh() )
ON CHANGE ( oDlg:aEvalWhen(), oBtn:Refresh() )
ON CHANGE ( oDlg:aEvalWhen(), oBtn:Refresh(), oDlg:Refresh() )
ON CHANGE ( oDlg:aEvalWhen(), oDlg:Refresh(), oBtn:Refresh() )
and the button remain disable with the cId and cPassword filled...
Saludos / Greetings
Jair A. Linares
FWH 13.07/ Harbour 3.2.0 dev (r1306132159)/ Borland C++ 5.82 / UEStudio 9.20/ Help&Manual 5
jair.linares71@gmail.com
Jair A. Linares
FWH 13.07/ Harbour 3.2.0 dev (r1306132159)/ Borland C++ 5.82 / UEStudio 9.20/ Help&Manual 5
jair.linares71@gmail.com
-
- Posts: 1033
- Joined: Fri Oct 07, 2005 3:33 pm
- Location: Cochabamba - Bolivia
Re: ON CHANGE's GET method update BUTTON
Hi,
I don't sure but I can't see the container (dialog or win) of the get and button I think the ..... OF oDlg was missing in your code
regards
Marcelo
I don't sure but I can't see the container (dialog or win) of the get and button I think the ..... OF oDlg was missing in your code
regards
Marcelo
Re: ON CHANGE's GET method update BUTTON
Thanks again Marcelo, but that's not the problem... (the container is oDlg..)
Review your comments I'm trying with...
@ 85,180 GET cPassword OF oDlg PIXEL PASSWORD ON CHANGE ( oBtn:aEvalWhen(), oDlg:aEvalWhen(), UpdateWindow(), MsgInfo( 'Testing' ) )
It works !, but if I get MsgInfo() off, doesn't work...
Another thing, it works after the second character....
Thanks again, and I will testing and hopeful for any suggestions...
Review your comments I'm trying with...
@ 85,180 GET cPassword OF oDlg PIXEL PASSWORD ON CHANGE ( oBtn:aEvalWhen(), oDlg:aEvalWhen(), UpdateWindow(), MsgInfo( 'Testing' ) )
It works !, but if I get MsgInfo() off, doesn't work...
Another thing, it works after the second character....
Thanks again, and I will testing and hopeful for any suggestions...
Saludos / Greetings
Jair A. Linares
FWH 13.07/ Harbour 3.2.0 dev (r1306132159)/ Borland C++ 5.82 / UEStudio 9.20/ Help&Manual 5
jair.linares71@gmail.com
Jair A. Linares
FWH 13.07/ Harbour 3.2.0 dev (r1306132159)/ Borland C++ 5.82 / UEStudio 9.20/ Help&Manual 5
jair.linares71@gmail.com
- Detlef Hoefner
- Posts: 312
- Joined: Sat Oct 08, 2005 9:12 am
- Location: Germany
- Contact:
Re: ON CHANGE's GET method update BUTTON
Jair,
i don't think that the ON CHANGE clause is the right event to watch.
Please try somethig like:
Maybe that works for you.
Regards,
Detlef
i don't think that the ON CHANGE clause is the right event to watch.
Please try somethig like:
Code: Select all
@ 85,180 GET cPassword OF oDlg PIXEL PASSWORD;
VALID ( if ( empty( cPassword ), oBtn:Disable(), oBtn:Enable() ), .t. )
Regards,
Detlef
Re: ON CHANGE's GET method update BUTTON
Jair,
Hi,
Davide
please try this:fusion wrote:It works !, but if I get MsgInfo() off, doesn't work...
Code: Select all
@ 74,180 GET oGet1 VAR cId PIXEL
@ 85,180 GET oGet2 VAR cPassword PASSWORD PIXEL ON CHANGE (oGet1:SetFocus(),oGet2:SetFocus())
Davide
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: ON CHANGE's GET method update BUTTON
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
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9