Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid, last row scrolls without registering the mouse cli
Message
De
04/06/2007 14:48:52
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01230172
Message ID:
01230341
Vues:
19
This message has been marked as the solution to the initial question of the thread.
>>You may get into some complicated calculation of grid height in grid.resize - so that the grid always shows a whole number of rows (plus, from my experience, two pixels more - in VFP8 that was a way to avoid some scrolling issues, IIRC).

>Thanks for your response. I guess if there are no other option then calculations is what we have to aim for.

I would not change the grid height based on the user changing the row height -- this would be confusing and lead to potentially unusual grid heights.

I would instead keep the grid height fixed and allow the user to change the row height to only allow a full set of records to display (not allow partial). Basically, the row height would be allowed to be changed to a height based on the number of rows that can be viewed. As the user increases/decreases the height -- you would "snap" to a height based on the number of visible records and adjust for the amount of partial record. Other words, if the user selects a row height that leaves a partial row, then you adjust further in program code to increase/decrease the height based on the number of full rows; i.e.

row height = (grid height - header height) / number of full rows

Not sure of the events involved but this would be my approach.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform