Problem with focus

Problem with focus

Postby Dorneles » Sat Dec 22, 2007 11:22 pm

Code: Select all  Expand view
   REDEFINE GET oGetItem.it_codbarra   VAR aGetItem.it_codbarra   ID 4005 OF oDlgM PICTURE "@!"   WHEN (lDisableI .AND. vModo = "I" .AND. EMPTY(aGetItem.it_codbarra))  VALID AchaProduto(@aGetItem,@oGetItem,1)
   REDEFINE GET oGetItem.it_id_comanda VAR aGetItem.it_id_comanda ID 4002 OF oDlgM PICTURE "@!"   WHEN (lDisableI .AND. vModo = "I" .OR. vModo = "A" )  VALID AchaComanda(aGetCli)
   REDEFINE GET oGetItem.it_nm_produto VAR aGetItem.it_nm_produto ID 4008 OF oDlgM PICTURE "@!"   NO MODIFY UPDATE color nRGB( 000, 070, 180 ),nRGB( 255, 255, 255 )
   REDEFINE GET oGetItem.it_quantidade VAR aGetItem.it_quantidade ID 4014 OF oDlgM PICTURE "999,999.999"   WHEN IF(vmodo = "I",(lDisableI  .AND. EMPTY(aGetItem.it_quantidade)),lDisableI) VALID FTotProd(@aGetCli,2)
   REDEFINE GET oGetItem.it_prunitario VAR aGetItem.it_prunitario ID 4016 OF oDlgM PICTURE "999,999.999"   WHEN .F. //lDisableI VALID aGetItem.vlunit_ped > 0
   REDEFINE GET oGetItem.it_prtotal    VAR aGetItem.it_prtotal    ID 4007 OF oDlgM PICTURE "999,999.999"   WHEN .F. color nRGB( 000, 070, 180 ),nRGB( 255, 255, 255 )

   REDEFINE BUTTON oBtn1 ID 702 OF oDlgM WHEN (!EMPTY(aGetItem.it_quantidade)) ACTION (GravaProduto(aGetCli,oGetCli,aGetItem,vModo,@nRegi),oGetItem.it_codbarra:SetFocus()) UPDATE
   REDEFINE BUTTON       ID 701 OF oDlgM ACTION (CancelaIt(oGetCli,@aGetCli,@lSaidaM,@lBotaol),oDlgM:End()) UPDATE CANCEL


What can this wrong, the focus needs to go to oGetItem.it_codbarra
Dorneles
 
Posts: 30
Joined: Mon Oct 30, 2006 2:39 pm
Location: Brasil

Postby Antonio Linares » Sun Dec 23, 2007 1:35 am

ACTIVATE DIALOG oDlgM ON INIT ( oGetItem.it_codbarra:SetFocus(), .F. )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Dorneles » Sun Dec 23, 2007 2:31 am

Very thankful!

And to force the focus go to the object after using a FUNCTION GRAVAPRODUTO()

Code: Select all  Expand view
REDEFINE BUTTON oBtn1 ID 702 OF oDlgM WHEN (!EMPTY(aGetItem.it_quantidade)) ACTION (GravaProduto(aGetCli,oGetCli,aGetItem,vModo,@nRegi),oGetItem.it_codbarra:SetFocus()) UPDATE

Dorneles
 
Posts: 30
Joined: Mon Oct 30, 2006 2:39 pm
Location: Brasil

Postby Antonio Linares » Sun Dec 23, 2007 10:38 am

REDEFINE BUTTON oBtn1 ID 702 OF oDlgM WHEN (!EMPTY(aGetItem.it_quantidade)) ACTION (GravaProduto(aGetCli,oGetCli,aGetItem,vModo,@nRegi),oBtn1:oJump := oGetItem.it_codbarra ) UPDATE
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests