FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Daniel Garcia - TGET, ACTION, VALID problema? (RESOLVIDO)
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Daniel Garcia - TGET, ACTION, VALID problema? (RESOLVIDO)
Posted: Thu Jul 08, 2010 11:56 AM
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
...
::lCancel = .T. // so the GET VALID is not fired when the button is focused

Porem se eu comentar o código, ex:

//::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
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: Daniel Garcia - TGET, ACTION, VALID problema?
Posted: Thu Jul 08, 2010 12:14 PM

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. :D

Obrigado

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Daniel Garcia - TGET, ACTION, VALID problema? (RESOLVIDO)
Posted: Thu Jul 08, 2010 01:56 PM

SGS

Bien :D :D

Continue the discussion