Daniel,
Referente ao código abaixo:
redefine get oget[1] var n1 id 100 of odlg picture "99" valid !empty(n1) bitmap "LUPA" action(msg("lupa get 1"))
redefine get oget[2] var n2 id 101 of odlg picture "99" valid !empty(n3) bitmap "LUPA" action(msg("lupa get 2"))
Foco no GET[1], se eu clicar no botão do GET[2], o VALID do GET[1] não é executado.
Acredito que o problema ocorre porque no:
METHOD CreateButton() CLASS TGet
...
::oBtn:lCancel = .T. // so the GET VALID is not fired when the button is focused
Porem se eu comentar o código, ex:
//::oBtn:lCancel = .T.
O VALID do GET[1] não me deixa clicar no botão do proprio GET[1].
Como resolver esta situação?
Obrigado
Daniel Garcia - TGET, ACTION, VALID problema? (RESOLVIDO)
Daniel Garcia - TGET, ACTION, VALID problema? (RESOLVIDO)
Last edited by MGA on Thu Jul 08, 2010 12:14 pm, edited 1 time in total.
Re: Daniel Garcia - TGET, ACTION, VALID problema?
RESOLVIDO ASSIM:
METHOD CreateButton() CLASS TGet
...
// Passei a controlar em GOTFOCUS/LOSTFOCUS
//::oBtn:lCancel = .T. // so the GET VALID is not fired when the button is focused
METHOD LostFocus( hCtlFocus ) CLASS TGet
if ::oBtn != nil
::oBtn:lCancel = .F. // so the GET VALID is not fired when the button is focused
endif
METHOD GotFocus( hCtlLost ) CLASS TGet
if ::oBtn != nil
::oBtn:lCancel = .T. // so the GET VALID is not fired when the button is focused
endif
Não sei se é a melhor maneira.
Obrigado
METHOD CreateButton() CLASS TGet
...
// Passei a controlar em GOTFOCUS/LOSTFOCUS
//::oBtn:lCancel = .T. // so the GET VALID is not fired when the button is focused
METHOD LostFocus( hCtlFocus ) CLASS TGet
if ::oBtn != nil
::oBtn:lCancel = .F. // so the GET VALID is not fired when the button is focused
endif
METHOD GotFocus( hCtlLost ) CLASS TGet
if ::oBtn != nil
::oBtn:lCancel = .T. // so the GET VALID is not fired when the button is focused
endif
Não sei se é a melhor maneira.

Obrigado
Last edited by MGA on Thu Jul 08, 2010 2:41 pm, edited 1 time in total.
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Daniel Garcia - TGET, ACTION, VALID problema? (RESOLVIDO)
SGS
Bien

Bien


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