Daniel Garcia - TGET, ACTION, VALID problema? (RESOLVIDO)

Daniel Garcia - TGET, ACTION, VALID problema? (RESOLVIDO)

Postby MGA » 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
...
::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
Last edited by MGA on Thu Jul 08, 2010 12:14 pm, edited 1 time in total.
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: Daniel Garcia - TGET, ACTION, VALID problema?

Postby MGA » 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
Last edited by MGA on Thu Jul 08, 2010 2:41 pm, edited 1 time in total.
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: Daniel Garcia - TGET, ACTION, VALID problema? (RESOLVIDO)

Postby Daniel Garcia-Gil » Thu Jul 08, 2010 1:56 pm

SGS


Bien :D :D
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 27 guests