Como puedo regresar el foco a un get ??

Post Reply
gabo
Posts: 117
Joined: Tue Jan 03, 2006 8:31 pm

Como puedo regresar el foco a un get ??

Post by gabo »

Tengo el siguiente codigo donde uso un get

Code: Select all

   REDEFINE GET oGets[8] VAR hVars["CLAVE"] ID 706 OF oDlgChild 
   oGets[8]:bKeyDown:= { |nKey| IIF( nKey == VK_RETURN, ;
   ( ChkArticulos( oGets[8], hVars["CLAVE"] ), 1 ) , 0 ) }

   REDEFINE BUTTONBMP oBotons[2] ID 716  OF oDlgChild;
            ACTION ( AddItemToBrowse(aDetalle, hVars, oGets), ;
                     oBrwDetalle:Refresh(), oGets[8]:SetFocus(), oGets[8]:Refresh() ) ;
            BITMAP "BMP_ADD_ITEM"
En el botonbmp grabo datos en un browse y refresco, despues se supone que debe de regresar al GET anterior y no lo hace! me pueden orientar y decirme donde puede estar mi error !

Sin embargo si le pongo un MsgStop() antes de poner el foco en el get, si lo regresa el foco al get

Code: Select all

REDEFINE BUTTONBMP oBotons[2] ID 716  OF oDlgChild;
            ACTION ( AddItemToBrowse(aDetalle, hVars, oGets), ;
                     oBrwDetalle:Refresh(), MsgStop("hola"), oGets[8]:SetFocus(), oGets[8]:Refresh() ) ;
            BITMAP "BMP_ADD_ITEM"
Saludos
GABO
User avatar
Ale SB
Posts: 248
Joined: Wed Jan 11, 2006 11:30 am
Location: Campo Grande-MS / Brasil

Post by Ale SB »

Amigo tente usar apos el get:refresh,

oDlg:Update()

Saluds
aleseribeli@hotmail.com

FwH, Hb Svn, ADS 8.1, ADS 10, Pelles C, FwPPC, MsVc 2008, MsVc 2010
"Conhecimento, você não subtrai quando divide; mas soma e multiplica."
**---Mário Persona---**
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Gabo,

Prueba asi:

Code: Select all

REDEFINE BUTTONBMP oBotons[2] ID 716  OF oDlgChild; 
            ACTION ( AddItemToBrowse(aDetalle, hVars, oGets), ; 
                     oBrwDetalle:Refresh(), MsgStop("hola"), oBotons[2]:oJump := Gets[8], oGets[8]:Refresh() ) ; 
            BITMAP "BMP_ADD_ITEM"
regards, saludos

Antonio Linares
www.fivetechsoft.com
gabo
Posts: 117
Joined: Tue Jan 03, 2006 8:31 pm

Post by gabo »

Gracias antonio:
pero no funciono.. sigue igual no pasa el foco al get, lo unico que hago es un refresh de un xbrowse..
saludos
antolin
Posts: 475
Joined: Thu May 10, 2007 8:30 pm
Location: Sevilla

Post by antolin »

Intenata:

PostMessage(oGets[8]:hWnd, WM_SETFOCUS)

o

PostMessage(oGets[8]:hWnd, FM_CHANGEFOCUS)
Peaaaaaso de foro...
gabo
Posts: 117
Joined: Tue Jan 03, 2006 8:31 pm

Post by gabo »

Antolin,

gracias!!!

funciono perfecto!!

Saludos
GABO
Post Reply