records on xbrowse

records on xbrowse

Postby Silvio.Falconi » Mon Mar 25, 2024 9:42 am

I can Know how many records are on xbrowse ?
I explain

I would like to activate the arrows for moving the records (up and down) only when the records are greater than the normal number displayed in the xbrowse table
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: records on xbrowse

Postby nageswaragunupudi » Mon Mar 25, 2024 12:11 pm

Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: records on xbrowse

Postby Silvio.Falconi » Tue Mar 26, 2024 9:13 am

nageswaragunupudi wrote:oBrw:nLen

But in case of DBF, please see
viewtopic.php?f=3&t=44259&p=268091&hilit=DELETED&sid=ff38ec55e29d34b39e3578311e2aeb8d#p268091


Image

I want to have the exact number of pages displayed with the dimensions of the xbrowse and I need this to activate my buttons which you can see in the right corner under the xbrowse
to activate my buttons I make

Code: Select all  Expand view

....
:CreateFromCode()
 END
lArrows:= IIF( oBrw:nDataRows<oBrw:nLen,.t.,.f.)


 


but it not run because I have 0 and -4

how I can resolve it ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: records on xbrowse

Postby nageswaragunupudi » Tue Mar 26, 2024 9:49 am

oBrw:nLen and oBrw:nDataRows get their values after the first Refresh/paint of the browse.
Also oBrw:nDataRows changes when browse is resized.

Code: Select all  Expand view
DEFINE BUTTON/BTNBMP ..... (arrows)  ... WHEN ( oBrw:nDataRows >= oBrw:nLen )

would work
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: records on xbrowse

Postby Silvio.Falconi » Tue Mar 26, 2024 11:20 am

nageswaragunupudi wrote:oBrw:nLen and oBrw:nDataRows get their values after the first Refresh/paint of the browse.
Also oBrw:nDataRows changes when browse is resized.

Code: Select all  Expand view
DEFINE BUTTON/BTNBMP ..... (arrows)  ... WHEN ( oBrw:nDataRows >= oBrw:nLen )

would work



Not%20working

I made
Code: Select all  Expand view
@  oBrw:nbottom+2, oBrw:nWidth-86 BTNBMP    aBtn[ 5 ]   SIZE 30, 25 PIXEL OF oDlg FLAT GDIP NOROUND  ; //
        RESOURCE "GRID_BOTTOM", "", hBmp, "" ;
     ACTION  oBrw:KeyDown(VK_DOWN, 0)  TOOLTIP "avanti"  WHEN (  oBrw:nDataRows >= oBrw:nLen   )
     @  oBrw:nbottom+2, oBrw:nWidth-56 BTNBMP    aBtn[ 6 ]   SIZE 30, 25 PIXEL OF oDlg FLAT GDIP NOROUND  ; //
        RESOURCE "GRID_TOP", "", hBmp1, "" ;
     ACTION oBrw:KeyDown(VK_UP, 0)   TOOLTIP "indietro" WHEN ( oBrw:nDataRows >= oBrw:nLen  )


INIT

Image

[img]with%20search[/img]

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: records on xbrowse

Postby Silvio.Falconi » Tue Mar 26, 2024 11:29 am

perhaps I resolved with WHEN ( oBrw:nDataRows < oDbf:OrdKeyCount() )

init
Image

after search
Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: records on xbrowse

Postby nageswaragunupudi » Tue Mar 26, 2024 12:43 pm

oDbf:OrdKeyCount() )


This works only for oDbf.
Using oBrw:nLen or oBrw:KeyCount() works for all datasources.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: records on xbrowse

Postby Silvio.Falconi » Tue Mar 26, 2024 12:49 pm

nageswaragunupudi wrote:
oDbf:OrdKeyCount() )


This works only for oDbf.
Using oBrw:nLen or oBrw:KeyCount() works for all datasources.


ok but the button are not refreshed , only when I move the mouse into obrw

for a sample
WHEN ( oBrw:nDataRows <= oBrw:nLen ) not work
WHEN ( oBrw:nDataRows >= oBrw:nLen ) not work


oBrw:nDataRows <= oBrw:nLen - Not working

Image

oBrw:nDataRows >= oBrw:nLen Here it works but in reverse

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: records on xbrowse

Postby Silvio.Falconi » Wed Mar 27, 2024 9:20 am

any solution please ?

the problem is when I make a search for a sample "frank" ( on First) ndatarow is 3 and also obrw:nlen is 3

I tried to inser a variable nTotalrecords at init

oDbf:= TCustomer():New()
oDbf:setorder(1)
oDbf:Gotop()
nTotalRecords:= oDbf:OrdKeyCount()


and the on each button

WHEN ( nTotalRecords > oBrw:nDataRows ) but it's wrong also
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 92 guests