Page 1 of 1

FastEdit en xBrowse

Posted: Wed Jun 06, 2012 10:17 pm
by acuellar
Hola amigos
Cómo hago para que pulsando ENTER o doble Cick ejecute una funcion y cuando pulse F2 edite el campo (Igual al explorer de windows)
Con el doble Click no hay problema.
Tengo esto:

Code: Select all

  oCol:=oBrw:AddCol()
   oCol:bStrData  := { || NOMBRE }
   oCol:nHeadStrAlign := AL_CENTER
   oCol:cHeader:= "NOMBRE"
   oCol:nWidth:=250
   oCol:nEditType := EDIT_GET
   oCol:bOnPostEdit := {|o, v, n| DATOS->NOMBRE:=v }
   oCol:bLDClickData:={ || Funcion() }

  oBrw:bKeyDown:={ |nKey| if(nKey=VK_RETURN,Funcion(), ),iif(nKey=VK_F2, __KeyBoard(Chr(13)), ) }
 
Gracias por la ayuda

Saludos,

Adhemar

Re: FastEdit en xBrowse

Posted: Mon Jun 11, 2012 9:50 am
by nageswaragunupudi

Code: Select all

oBrw:lF2KeyToEdit := .t.   // default .f.
oBrw:lEnterKey2Edit := .f. // default
 
After this code, please assign your action to Enter key

Re: FastEdit en xBrowse

Posted: Mon Jun 11, 2012 1:41 pm
by Eoeo
this are on last version of xbrowse ? and wich other key is inserted ?

Re: FastEdit en xBrowse

Posted: Mon Jun 11, 2012 2:10 pm
by nageswaragunupudi
FWH 10.6

Re: FastEdit en xBrowse

Posted: Mon Jun 11, 2012 4:42 pm
by acuellar
Thanks G. N. Rao.

Is now better

When I edit with F2 changes performed by pressing enter executes the action of the enter.

Double click to edit and run the action,

Regards,

Adhemar