Navigating a BROWSE

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

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: 3409
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 268 times
Been thanked: 173 times
Contact:

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: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

Post by sudip »

Hi CCH,

Have you given the command at first :

SET BROWSESYNC ON

Regards.

Sudip
With best regards,
Sudip

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER »

Hi Sudip

Yes, I have SET BROWSESYN ON...


CCH
http://cch4clipper.blogspot.com

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

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: 3409
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 268 times
Been thanked: 173 times
Contact:

Post by mol »

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

Post Reply