Navigating a BROWSE

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Navigating a BROWSE

Post by CCH4CLIPPER »

Hi All

Take a look at this function :-

Function BrMove(met)
do case
case met == 1
dbGotop()
_GridHome ( "Browse_1",thiswindow.name )
case met == 2
_GridPgUp ( "Browse_1",thiswindow.name )
case met == 3
dbSkip(-1)
_GridPrior( "Browse_1",thiswindow.name )
case met == 4
dbSkip(1)
_GridNext ( "Browse_1",thiswindow.name )
case met == 5
_GridPgDn ( "Browse_1",thiswindow.name )
case met == 6
dbGoBottom()
_GridEnd ( "Browse_1",thiswindow.name )
endcase

Problems
1. For case met == 6, it will not go to the last record but instead it will stop at the last record within the visible Browse
Assuming Table has a 100 records and Browse shows say 30 records, I expect it to go to record 100. Instead it stops at Record 20

2. For case met == 5, it will not go to the next page but instead it will stop at the last record within the visible Browse
Assuming Table has a 100 records and Browse shows say 30 records, I expect the Browse to show records 31 to 60. Instead
Instead it stops at Record 20

3. For case met == 4, if cursor is at say Record 20, this will stay at Record 20


Q. What must I do to get the Browse to behave as expected ?


TIA

CCH
http://cch4clipper.blogspot.com
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Navigating a BROWSE

Post by mol »

CCH4CLIPPER wrote:Hi All


case met == 6
dbGoBottom()
_GridEnd ( "Browse_1",thiswindow.name )
endcase

Problems
1. For case met == 6, it will not go to the last record but instead it will stop at the last record within the visible Browse
Assuming Table has a 100 records and Browse shows say 30 records, I expect it to go to record 100. Instead it stops at Record 20
About met ==6 try this sequence, if it satisfying for you:

dbGoBottom()
SetProperty(thisWindow.name,"Browse_1","Value", recno() )


It will move pointe of Browse to last record

regards, Marek
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Navigating a BROWSE

Post by sudip »

Hi CCH,

Have you given the command at first :

SET BROWSESYNC ON

Regards.

Sudip
With best regards,
Sudip
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Re: Navigating a BROWSE

Post by CCH4CLIPPER »

Hi Sudip

Yes, I have SET BROWSESYN ON...


CCH
http://cch4clipper.blogspot.com
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Re: Navigating a BROWSE

Post by CCH4CLIPPER »

Hi Marek

Hip ! Hip ! Hooray !

SetProperty(thisWindow.name,"Browse_1","Value", recno() ) works perfectly !

BTW, I had somehow expected you to give the right advice :-)

TQVM

CCH
http://cch4clipper.blogspot.com
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Navigating a BROWSE

Post by mol »

I knew that works good, because I use it in my program...
Post Reply