Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enabling/Disabling nav buttons?
Message
De
31/07/1997 12:59:40
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00042628
Message ID:
00042637
Vues:
32
>I was adding a new property to my next and previous navbuttons: Skipsize. Skipsize determines how many records are skipped when the buttons are clicked. This is useful for grids in which you want to move the record pointer a page at a time. The problem I forsee is determining how many records to the beginning or end of a table. For example, if you are at record 90 of a 100 record table and skipsize is 12, the next record it will go to will be 102. Obviously this is incorrect. So, I simply did a reccount - current record and if that is less than skipsize I go to EOF. However, I don't think this will work if there is a filter on the table. Any ideas on a better way to approach this?

if nDirection = 1 and !eof()
skip nSkipSize
if eof()
go bottom
endif
else
if !bof()
skip nSkipSize * -1
endif
if bof()
go top
endif
endif

In 100 records table if you are on 93rd record "skip 12" move rec pointer to EOF.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform