Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reinventing the Wheel
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00289820
Message ID:
00289854
Vues:
22
>Can anyone recommend a basic class library out there that has some basic navigational buttons such as Next, Previous, Save, Cancel/Revert? All I'm really looking for is an intelligent Next and Previous Button that disable themselves when they are on the first and last records without going past the beginning or end of file. So if you are at the first record, you don't have to press previous before it greys itself out.
I think there are some navigational tools included with VFP. If not you could make your own. I've seen sample code/

To NEXT and PREVIOUS disable at top or bottom (in INDEX order) you would have to:

in your Previous.Click
skip -1
this.enabled=OkayToKeepPreviousEnabled()

procedure OkayToKeepPreviousEnabled
r=recno()
skip -1
PreviousEnabled=iif(BOF(),.f.,.t.)
goto r
return PreviousEnabled

>
>Also is there an easy way to display what record you are on out of how many? The problem I have is reccount() does not consider deleted records and gives an inaccurate total count. Also it would be nice if the current record is numbered by it position in the current order.

I also wait for a reccountNOTDELETED()and a recnoORDERSEQUENCE() function, but we don't have them yet. I faced these very issues. The COUNT function is very fast. Use that (with DELETED ON) to assess the non-deleted records.



>
>Thanks!
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform