CONSULTA XBROWSE

Post Reply
Pg_cts
Posts: 32
Joined: Thu Dec 07, 2017 10:26 am

CONSULTA XBROWSE

Post by Pg_cts »

Buenas compañeros,

Cuando se pulsa doble click en alguna columna en la cabecera del Browse.

Hay alguna variable o metodo que devuelva sobre que columna se ha dado doble click?

Gracias
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: CONSULTA XBROWSE

Post by nageswaragunupudi »

Right now, this is not possible.
For this we need to make some change in the xbrowse.prg:

Change:
Please locate these lines of code at the end of METHOD LDblClick( nRow, nCol, nKeyFlags )

Code: Select all | Expand

    if nColPos != 0 .and. nRowPos != 0
      return ::Super:LDblClick( nRow, nCol, nKeyFlags )
   Endif
return 0
 
Please make the following change:

Code: Select all | Expand

return ::Super:LDblClick( nRow, nCol, nKeyFlags )
After this change we can do this:

Code: Select all | Expand

   XBROWSER "CUSTOMER.DBF" SETUP ( ;
      oBrw:bLDblClick := { |r,c,f,o| DblClick( r,c,f,o ) } )

//-----------------

function DblClick( r, c, f, oBrw )

   local oCol, nCol

   if oBrw:MouseAtHeader( r, c )
      if ( nCol := oBrw:MouseColPos( c ) ) > 0
         oCol  := oBrw:ColAtPos( nCol )
         // now do anything with oCol
         // example:
         ? oCol:cHeader
         return 0
      endif
   endif

return nil
Regards

G. N. Rao.
Hyderabad, India
Pg_cts
Posts: 32
Joined: Thu Dec 07, 2017 10:26 am

Re: CONSULTA XBROWSE

Post by Pg_cts »

Muchas gracias, voy a probar.
Post Reply