Versions des environnements
>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement