FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour xBrowse - 1ra. y Ășltima filas pintadas
Posts: 128
Joined: Wed Oct 26, 2005 12:18 PM
xBrowse - 1ra. y Ășltima filas pintadas
Posted: Thu Oct 13, 2011 02:27 AM
Hola.
ÂżCĂłmo averiguo cuĂĄles son la primera y la Ășltima filas pintadas en un xBrowse?

Me gustarĂ­a, por ejemplo, poder escribir el mensaje: Mostrando resultados 7 al 29 de un total de 50
y que éste se actualizara al navergar por el xbrowse.

Por supuesto, no deseo agregar una nueva columna mostrando ::bKeyNo

Gracias.
ÂĄSalud y saludos!
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse - 1ra. y Ășltima filas pintadas
Posted: Thu Oct 13, 2011 01:21 PM

nFirstKeyNo := oBrw:KeyNo() - oBrw:nRowSel + 1
nLastKeyNo := nFirstKeyNo + oBrw:RowCount() - 1

In case of RDD, nFirstKeyNo and nLastKeyNo are the OrdKeyNo() of the first and last records displayed.

In case of Array, nFirstKeyNo and nLastKeyNo are the first and last array elements displayed. In case of RecoreSet they are AbsolutePostion of the first and last rows.

Regards



G. N. Rao.

Hyderabad, India
Posts: 128
Joined: Wed Oct 26, 2005 12:18 PM
Re: xBrowse - 1ra. y Ășltima filas pintadas
Posted: Fri Oct 14, 2011 03:54 AM

Thank you very much, Mr. N.

Now I have EXTENDed CLASS txBrowse WITH METHOD nFirstKeyNo (and nLastKeyNo).

Regards.
César Lozada

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse - 1ra. y Ășltima filas pintadas
Posted: Fri Oct 14, 2011 04:09 AM
César E. Lozada wrote:Thank you very much, Mr. N.

Now I have EXTENDed CLASS txBrowse WITH METHOD nFirstKeyNo (and nLastKeyNo).

Regards.
César Lozada

Please reconsider. There will be hundreds of such requirements for various purposes. Should we keep modifying the main class for each such requirement? Will there be ever an end for it? Can we not make do with functions?

What makes a good case for modifying a class is when the class itself has to know these datas or methods for its own working.

Just my personal opinion.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion