CONSULTA XBROWSE

CONSULTA XBROWSE

Postby Pg_cts » Sun Nov 19, 2023 7:37 pm

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
Pg_cts
 
Posts: 32
Joined: Thu Dec 07, 2017 10:26 am

Re: CONSULTA XBROWSE

Postby nageswaragunupudi » Mon Nov 20, 2023 2:06 pm

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 view
   if nColPos != 0 .and. nRowPos != 0
      return ::Super:LDblClick( nRow, nCol, nKeyFlags )
   Endif
return 0
 


Please make the following change:
Code: Select all  Expand view
return ::Super:LDblClick( nRow, nCol, nKeyFlags )


After this change we can do this:
Code: Select all  Expand view
  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
User avatar
nageswaragunupudi
 
Posts: 10633
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: CONSULTA XBROWSE

Postby Pg_cts » Mon Nov 20, 2023 11:03 pm

Muchas gracias, voy a probar.
Pg_cts
 
Posts: 32
Joined: Thu Dec 07, 2017 10:26 am


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: paquitohm and 39 guests